@Test(expectedExceptions = InstanceNotFoundException.class, expectedExceptionsMessageRegExp = "com\\.proofpoint\\.reporting:name=TestingObject not found") public void testUnRegisterLegacyNotFound() throws Exception { registry.unregisterLegacy(TESTING_OBJECT_NAME); }
void unregisterLegacy(ObjectName name) throws InstanceNotFoundException { ReportedBean remove = legacyReportedBeans.remove(name); if (remove == null) { throw new InstanceNotFoundException(name.getCanonicalName() + " not found"); } reportedBeans.remove(new Reference(remove)); }
ReportedBeanRegistry { void unregisterLegacy(ObjectName name) throws InstanceNotFoundException { ReportedBean remove = legacyReportedBeans.remove(name); if (remove == null) { throw new InstanceNotFoundException(name.getCanonicalName() + " not found"); } reportedBeans.remove(new Reference(remove)); } }
ReportedBeanRegistry { void unregisterLegacy(ObjectName name) throws InstanceNotFoundException { ReportedBean remove = legacyReportedBeans.remove(name); if (remove == null) { throw new InstanceNotFoundException(name.getCanonicalName() + " not found"); } reportedBeans.remove(new Reference(remove)); }  }
ReportedBeanRegistry { void unregisterLegacy(ObjectName name) throws InstanceNotFoundException { ReportedBean remove = legacyReportedBeans.remove(name); if (remove == null) { throw new InstanceNotFoundException(name.getCanonicalName() + " not found"); } reportedBeans.remove(new Reference(remove)); }   }
ReportedBeanRegistry { void unregisterLegacy(ObjectName name) throws InstanceNotFoundException { ReportedBean remove = legacyReportedBeans.remove(name); if (remove == null) { throw new InstanceNotFoundException(name.getCanonicalName() + " not found"); } reportedBeans.remove(new Reference(remove)); }    }