1
2
3
4
5
6
7 package org.mule.transport.http.functional;
8
9 import org.mule.api.MuleMessage;
10 import org.mule.module.client.MuleClient;
11 import org.mule.tck.junit4.FunctionalTestCase;
12 import org.mule.tck.junit4.rule.DynamicPort;
13
14 import org.junit.Rule;
15 import org.junit.Test;
16
17 import static org.junit.Assert.assertEquals;
18 import static org.junit.Assert.assertNotNull;
19
20 public class HttpMultipleCookiesInEndpointTestCase extends FunctionalTestCase
21 {
22
23 @Rule
24 public DynamicPort dynamicPort = new DynamicPort("port1");
25
26 @Override
27 protected String getConfigResources()
28 {
29 return "http-multiple-cookies-on-endpoint-test.xml";
30 }
31
32 @Test
33 public void testThatThe2CookiesAreSentAndReceivedByTheComponent() throws Exception
34 {
35 MuleClient client = new MuleClient(muleContext);
36 MuleMessage response = client.send("vm://in", "HELLO", null);
37 assertNotNull(response);
38 assertNotNull(response.getPayload());
39 assertEquals("Both Cookies Found!", response.getPayloadAsString());
40 }
41
42 }
43
44