SCMPMessage request = new SCMPMessage(SCMPVersion.CURRENT);
request.setBody("request");
request.setMessageType(SCMPMsgType.CLN_EXECUTE);
SCMPPart firstPart = new SCMPPart(SCMPVersion.CURRENT, false);
String bodyString = "first part request";
firstPart.setBody(bodyString);
SCMPCompositeReceiver largeResponse = new SCMPCompositeReceiver(request, firstPart);
bodyLength += bodyString.length();
body.append(bodyString);
Assert.assertEquals(bodyLength, largeResponse.getOffset());
for (int i = 0; i < 10; i++) {
SCMPPart part = new SCMPPart(SCMPVersion.CURRENT);
bodyString = "part nr: " + i;
part.setBody(bodyString);
largeResponse.add(part);
bodyLength += bodyString.length();
body.append(bodyString);
Assert.assertEquals(bodyLength, largeResponse.getOffset());
}