Object[] args = new Object[] {
proxy,
ProxyTrustUtil.newProxyInstance(new Interface1Impl(), ptih, cl),
ProxyTrustUtil.newProxyInstance(new Interface1Impl()),
ProxyTrustUtil.newProxyInstance(new Interface2Impl(), ptih),
ProxyTrustUtil.newProxyInstance(new Interface12Impl(), ptih)};
boolean[] expRes = new boolean[] { true, true, false, false, false };
Object res;
for (int i = 0; i < args.length; ++i) {
res = ptihInvoke(ptih, proxy, m, new Object[] { args[i] });
if (!isOk(res, expRes[i])) {
// FAIL
throw new TestException(
"'invoke' method of constructed "
+ "ProxyTrustInvocationHandler returned " + res
+ ", while Boolean(" + expRes[i]
+ ") was expected.");
}
}
proxy = ProxyTrustUtil.newProxyInstance(new Interface12Impl(), ptih);
args = new Object[] {
proxy,
ProxyTrustUtil.newProxyInstance(new Interface12Impl(), ptih, cl),
ProxyTrustUtil.newProxyInstance(new Interface12Impl()),
ProxyTrustUtil.newProxyInstance(new Interface13Impl(), ptih),
ProxyTrustUtil.newProxyInstance(new Interface21Impl(), ptih) };
expRes = new boolean[] { true, true, false, false, false };
for (int i = 0; i < args.length; ++i) {