1
2
3
4
5
6
7 package org.mule.transport.servlet.jetty;
8
9 import org.mule.api.MuleMessage;
10 import org.mule.api.client.LocalMuleClient;
11 import org.mule.transport.http.HttpConstants;
12 import org.mule.transport.http.functional.HttpFunctionalTestCase;
13
14 import java.util.HashMap;
15 import java.util.Map;
16
17 import org.junit.Test;
18
19 import static org.junit.Assert.assertEquals;
20
21 public class JettyHttpFunctionalTestCase extends HttpFunctionalTestCase
22 {
23
24 @Override
25 protected String getConfigResources()
26 {
27 return "jetty-http-functional-test.xml";
28 }
29
30 @Test
31 public void testNonRootUrls() throws Exception
32 {
33 LocalMuleClient client = muleContext.getClient();
34 Map props = new HashMap();
35 props.put(HttpConstants.HEADER_CONTENT_TYPE, "text/plain;charset=UTF-8");
36 MuleMessage result = client.send("anotherClientEndpoint", TEST_MESSAGE, props);
37 assertEquals(TEST_MESSAGE + " Received", result.getPayloadAsString());
38 }
39
40 }