View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.transport.http.functional;
8   
9   import org.mule.api.transport.Connector;
10  import org.mule.api.transport.SessionHandler;
11  import org.mule.tck.junit4.FunctionalTestCase;
12  import org.mule.transport.http.HttpConnector;
13  
14  import org.junit.Test;
15  
16  import static org.junit.Assert.assertTrue;
17  
18  public class HttpServiceOverridesTestCase extends FunctionalTestCase
19  {
20  
21      @Override
22      protected String getConfigResources()
23      {
24          return "http-service-overrides.xml";
25      }
26  
27      @Test
28      public void testSessionHandler() 
29      {
30          Connector connector = muleContext.getRegistry().lookupConnector("httpConnector");
31          assertTrue(connector instanceof HttpConnector);
32          
33          HttpConnector httpConnector = (HttpConnector) connector;
34          SessionHandler sessionHandler = httpConnector.getSessionHandler();
35          assertTrue(sessionHandler instanceof TestSessionHandler);
36      }
37  
38  }