assertTrue("Should be registered", mBeanServer.isRegistered(mBeanName));
}
public void testSetCacheObjectName() throws Exception
{
ObjectName on = new ObjectName("jboss.cache:test=SetCacheObjectName");
boolean registered = false;
try
{
CacheJmxWrapper<String, String> wrapper = createWrapper(createConfiguration());
wrapper.setCacheObjectName(on.getCanonicalName());
// Register under the standard name
registerWrapper(wrapper);
// Should be registered under 'on'
registered = mBeanServer.isRegistered(on);
assertTrue("Registered with configured name", registered);
assertEquals("Configured name retained", on.getCanonicalName(), wrapper.getCacheObjectName());
wrapper.create();
wrapper.start();
interceptorRegistrationTest(on.getCanonicalName(), true);
wrapper.stop();
wrapper.destroy();
interceptorRegistrationTest(false);