@Test public void testUnRegister() throws Exception { Object object = new Object(); registry.register(object, TESTING_REPORTED_BEAN, false, "TestingObject", TESTING_TAGS); registry.unregister(object); assertEquals(registry.getReportedBeans(), ImmutableList.of()); }
void unregister(Object object) throws InstanceNotFoundException { if (reportedBeans.remove(new Reference(object)) == null) { throw new InstanceNotFoundException(object + " not found"); } }
ReportedBeanRegistry { void unregister(Object object) throws InstanceNotFoundException { if (reportedBeans.remove(new Reference(object)) == null) { throw new InstanceNotFoundException(object + " not found"); } } }
ReportedBeanRegistry { void unregister(Object object) throws InstanceNotFoundException { if (reportedBeans.remove(new Reference(object)) == null) { throw new InstanceNotFoundException(object + " not found"); } }  }
ReportedBeanRegistry { void unregister(Object object) throws InstanceNotFoundException { if (reportedBeans.remove(new Reference(object)) == null) { throw new InstanceNotFoundException(object + " not found"); } }   }
ReportedBeanRegistry { void unregister(Object object) throws InstanceNotFoundException { if (reportedBeans.remove(new Reference(object)) == null) { throw new InstanceNotFoundException(object + " not found"); } }    }