public void run() throws Exception {
int i;
Object o;
ActivationID aid = new FakeActivationID(logger);
MethodSetProxy fup = new MethodSetProxy(logger);
InvocationHandler handler2 = new ActivatableInvocationHandler(aid,
fup);
RemoteMethodSetInterface fakeProxy = (RemoteMethodSetInterface)
Proxy.newProxyInstance(
RemoteMethodSetInterface.class.getClassLoader(),
new Class[] {RemoteMethodSetInterface.class},
handler2);
ActivationID aid2 = new FakeActivationID(logger, fakeProxy, true);
InvocationHandler handler = new ActivatableInvocationHandler(aid2,
null);
RemoteMethodSetInterface fi = (RemoteMethodSetInterface)
Proxy.newProxyInstance(
RemoteMethodSetInterface.class.getClassLoader(),
new Class[] {RemoteMethodSetInterface.class},
handler);
fup.setInt(100);
fi.voidReturn();
assertion(fi.intReturn() == 110);
fup.setInt(200);
i = 1000;
o = new Object();
fi.voidReturn(i, o);
assertion(fi.intReturn() == 1220);
fup.setInt(300);
i = 2000;
fi.voidReturn(i);
assertion(fi.intReturn() == 2330);
o = new Object();
fup.setObject(o);
assertion(fi.objectReturn().equals(o));
i = Integer.MIN_VALUE;
fup.setInt(i);
o = new Object();
fup.setObject(o);
assertion(fi.objectReturn(o, i).equals(o));
i = i + 1;
assertion(fi.objectReturn(i).equals(new Integer(i)));
i = i + 1;
fup.setInt(i);
assertion(fi.intReturn() == i);
i = i + 1;
o = new Object();
assertion(fi.intReturn(i, o) == i);