SCMPMessage request = new SCMPMessage();
request.setBody("request");
request.setMessageType(SCMPMsgType.CLN_EXECUTE);
SCMPPart firstPart = new SCMPPart(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();
bodyString = "part nr: " + i;
part.setBody(bodyString);
largeResponse.add(part);
bodyLength += bodyString.length();
body.append(bodyString);
Assert.assertEquals(bodyLength, largeResponse.getOffset());
}