public void testProxy() throws Exception
{
ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
JBossObjectOutputStream objout = new JBossObjectOutputStream(byteOut);
TestProxy proxy = TestProxy.createTestInstance();
objout.writeObject(proxy);
objout.flush();
JBossObjectInputStream objinput = new JBossObjectInputStream(new ByteArrayInputStream(byteOut.toByteArray()));
TestProxy newProxy = (TestProxy)objinput.readObject();
assertEquals(proxy.getProxy().doSomething(),newProxy.getProxy().doSomething());
}