{
MBeanServer server = MBeanServerFactory.newMBeanServer();
InvocationHandlerTest test = new InvocationHandlerTest();
server.registerMBean(test, invocationHandlerTestName);
InvocationHandlerTestMBean proxy = (InvocationHandlerTestMBean) MBeanServerInvocationHandler.newProxyInstance(
server, invocationHandlerTestName, InvocationHandlerTestMBean.class, false);
assertEquals(null, test.getType());
test.setType(new Boolean(true));
assertEquals(true, proxy.getType().booleanValue());
}