objout.writeObject(proxy.getClass());
objout.flush();
SizeBenchmarkTestCase.saveFileNoCheck("/tmp/check.bin",byteout.toByteArray());
JBossObjectInputStream objectInput = new JBossObjectInputStream(new ByteArrayInputStream(byteout.toByteArray()));
Class baseNew = (Class)objectInput.readObject();
assertEquals(proxy.getClass(),baseNew);
//assertEquals(4,baseNew.doSomething(5));
}