}
assert sizes.get(1) < sizes.get(0) : "JBoss Marshaller should write less bytes: bytesJBoss=" + sizes.get(1) + ", bytesHome=" + sizes.get(0);
}
public void testReplicableCommandsMarshalling() throws Exception {
StateTransferControlCommand c1 = new StateTransferControlCommand(true);
List<Integer> sizes = new ArrayList<Integer>(2);
for (Marshaller marshaller : marshallers) {
byte[] bytes = marshaller.objectToByteBuffer(c1);
StateTransferControlCommand rc1 = (StateTransferControlCommand) marshaller.objectFromByteBuffer(bytes);
assert rc1.getCommandId() == c1.getCommandId() : "Writen[" + c1.getCommandId() + "] and read[" + rc1.getCommandId() + "] objects should be the same";
assert Arrays.equals(rc1.getParameters(), c1.getParameters()) : "Writen[" + c1.getParameters() + "] and read[" + rc1.getParameters() + "] 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);
ClusteredGetCommand c2 = new ClusteredGetCommand("key", "mycache");