1   /*
2    * $Id: RestEndpointMule1881TestCase.java 12297 2008-07-11 17:54:29Z dandiep $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.transport.servlet.jetty;
12  
13  import org.mule.api.endpoint.ImmutableEndpoint;
14  import org.mule.tck.AbstractMuleTestCase;
15  import org.mule.transport.servlet.jetty.JettyHttpConnector;
16  
17  public class RestEndpointMule1881TestCase extends AbstractMuleTestCase
18  {
19      
20      public void testJettyRestEndpointCreation() throws Exception
21      {
22          ImmutableEndpoint ep = muleContext.getRegistry().lookupEndpointFactory().getInboundEndpoint(
23              "jetty:rest://localhost:8080/loanbroker");
24          assertNotNull(ep);
25          assertTrue(ep.getConnector() instanceof JettyHttpConnector);
26      }
27  
28      public void testJettyHttpEndpointCreation() throws Exception
29      {
30          ImmutableEndpoint ep = muleContext.getRegistry().lookupEndpointFactory().getInboundEndpoint(
31              "jetty:rest://localhost:8080/loanbroker");
32          assertNotNull(ep);
33          assertTrue(ep.getConnector() instanceof JettyHttpConnector);
34      }
35  
36  }