// PASS
logger.fine("'invoke' invocation of "
+ "ProxyTrustInvocationHandler threw " + iae
+ " as expected.");
}
proxy = new RMCImpl();
m = RemoteMethodControl.class.getDeclaredMethod(
"setConstraints", new Class[] { MethodConstraints.class });
MethodConstraints mc = new BasicMethodConstraints(
new InvocationConstraints(
new InvocationConstraint[] { ClientAuthentication.YES },
null));
try {
ptihInvoke(ptih, proxy, m, new Object[] { mc });
// FAIL
throw new TestException(
"'invoke' invocation of ProxyTrustInvocationHandler "
+ "did not throw any exception while "
+ "some kind of exception was expected.");
} catch (Exception e) {
// PASS
logger.fine("'invoke' invocation of "
+ "ProxyTrustInvocationHandler threw " + e
+ " as expected.");
}
proxy = ProxyTrustUtil.newProxyInstance(new RMCImpl(),
new ProxyTrustInvocationHandler(main, boot));
try {
ptihInvoke(ptih, proxy, m, new Object[] { mc });