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