checkEqualityAndSize(UnsuccessfulResponse.INSTANCE);
}
public void testExtendedResponseMarshalling() throws Exception {
SuccessfulResponse sr = new SuccessfulResponse("Blah");
ExtendedResponse extended = new ExtendedResponse(sr, false);
List<Integer> sizes = new ArrayList<Integer>(2);
for (Marshaller marshaller : marshallers) {
byte[] bytes = marshaller.objectToByteBuffer(extended);
ExtendedResponse readObj = (ExtendedResponse) marshaller.objectFromByteBuffer(bytes);
assert extended.getResponse().equals(readObj.getResponse()) :
"Writen[" + extended.getResponse() + "] and read[" + readObj.getResponse() + "] objects should be the same";
assert extended.isReplayIgnoredRequests() == readObj.isReplayIgnoredRequests() :
"Writen[" + extended.isReplayIgnoredRequests() + "] and read[" + readObj.isReplayIgnoredRequests() + "] objects should be the same";
sizes.add(bytes.length);
}
assert sizes.get(1) < sizes.get(0) : "JBoss Marshaller should write less bytes: bytesJBoss=" + sizes.get(1) + ", bytesHome=" + sizes.get(0);
}