MetaDataContextInterceptor.classAnnotation = null;
server.invoke(bean, "someMethod", new Object[0], new String[0]);
assertNotNull(MetaDataContextInterceptor.classAnnotation);
assertTrue(MetaDataContextInterceptor.classAnnotation instanceof JMX);
JMX jmx = (JMX)MetaDataContextInterceptor.classAnnotation;
assertTrue(jmx.exposedInterface().equals(SimpleBean.class));
assertTrue(jmx.name() == null || jmx.name().length() == 0);
MetaDataContextInterceptor.classAnnotation = null;
server.invoke(notbean, "someOtherMethod", new Object[0], new String[0]);
assertNotNull(MetaDataContextInterceptor.classAnnotation);
assertTrue(MetaDataContextInterceptor.classAnnotation instanceof JMX);
JMX jmx2 = (JMX)MetaDataContextInterceptor.classAnnotation;
assertTrue(jmx2.exposedInterface().equals(SimpleBeanImplMBean.class));
assertEquals(jmx2.name(), "test:name=NotBean1");
MetaDataContextInterceptor.classAnnotation = null;
server.invoke(bean, "someMethod", new Object[0], new String[0]);
assertNotNull(MetaDataContextInterceptor.classAnnotation);
assertEquals(jmx, MetaDataContextInterceptor.classAnnotation);