1
2
3
4
5
6
7
8
9
10
11 package org.mule.transport.tcp.protocols;
12
13 import static org.junit.Assert.assertEquals;
14 import static org.junit.Assert.assertNotNull;
15
16 public class XmlMessageEOFProtocolTestCase extends XmlMessageProtocolTestCase
17 {
18
19 @Override
20 public void doSetUp()
21 {
22 setProtocol(new XmlMessageEOFProtocol());
23 }
24
25 @Override
26 public void testSlowStream() throws Exception
27 {
28 String msgData = "<?xml version=\"1.0\"?><data>hello</data>";
29
30 SlowInputStream bais = new SlowInputStream(msgData.getBytes());
31
32 byte[] result = read(bais);
33 assertNotNull(result);
34
35 assertEquals(msgData, new String(result));
36 }
37
38 }