}
// PASS
logger.fine("'test' method of main proxy returned null "
+ "as expected.");
Interface1RMCTEImpl mImpl1 = new Interface1RMCTEImpl();
main = newMainProxy(mImpl1);
ptih = createPTIH(main, boot);
proxy = ProxyTrustUtil.newProxyInstance(new Interface1Impl(), ptih);
m = TestInterface1.class.getDeclaredMethod("test1",
new Class[] { int.class });
res = ptihInvoke(ptih, proxy, m, new Object[] { new Integer(5) });
if (mImpl1.getTest1Num() != 1) {
// FAIL
throw new TestException(
"'test1' method of main proxy was called "
+ mImpl1.getTest1Num()
+ " times while 1 was expected.");
}
// PASS
logger.fine("'test1' method of main proxy was called "
+ " 1 time as expected.");
if (((Integer) res).intValue() != 5) {
// FAIL
throw new TestException(
"'test1' method of main proxy returned " + res
+ " while 5 was expected.");
}
// PASS
logger.fine("'test1' method of main proxy returned 6 as expected.");
m = TestInterface1.class.getDeclaredMethod("test", new Class[0]);
res = ptihInvoke(ptih, proxy, m, null);
if (mImpl1.getTestNum() != 1) {
// FAIL
throw new TestException(
"'test' method of main proxy was called "
+ mImpl.getTestNum() + " times while 1 was expected.");
}