assertEquals(4,baseNew.doSomething(5));
}
public void testSimpleAOPSerializationOnClass() throws Exception
{
ClassProxy proxy = createPOJOProxy();
proxy = createPOJOProxy();
BaseClass base = (BaseClass)proxy;
System.out.println("Result = "+ base.doSomething(1));
ByteArrayOutputStream byteout = new ByteArrayOutputStream();
JBossObjectOutputStream objout = new JBossObjectOutputStream(byteout);
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));
}