byte[] byteArray = byteOut.toByteArray();
saveFile("/tmp/jboss-direct-test-" + myTest.getClass().getName() + ".bin",byteArray);
System.out.println(myTest.getClass().getName() +" produced " + byteArray.length + " on doTestJBossSerializationInDirect");
ByteArrayInputStream byteInput = new ByteArrayInputStream(byteArray);
JBossObjectInputStream input = new JBossObjectInputStream(byteInput,buffer);
Object value = input.readObjectUsingDataContainer();
assertNotSame(myTest,value);
assertSame(myTest.getClass(),value.getClass());
if (!(myTest instanceof String[]))assertEquals(myTest,value);
}