JBossObjectOutputStream out = new JBossObjectOutputStream (byteout);
out.writeObject(proxy);
out.flush();
JBossObjectInputStream inp = new JBossObjectInputStream (new ByteArrayInputStream(byteout.toByteArray()));
InterfaceForProxy proxy2 = (InterfaceForProxy)inp.readObject();
assertEquals(6,proxy2.doSomething());
}
private InterfaceForProxy createProxy() {
ProxiedClass proxyClass = new ProxiedClass(2);
assertEquals(2,proxyClass.doSomething());