@Test public void testUnexportObjectNotRegistered() { try { reportExporter.unexportObject(TESTING_OBJECT); fail("expected ReportException"); } catch (ReportException e) { assertEquals(e.getReason(), Reason.INSTANCE_NOT_FOUND); assertEquals(e.getMessage(), "Testing Object not found"); } }
public void unexportObject(Object object) { try { registry.unregister(object); } catch (InstanceNotFoundException e) { throw new ReportException(Reason.INSTANCE_NOT_FOUND, e.getMessage()); } }
ReportExporter { public void unexportObject(Object object) { try { registry.unregister(object); } catch (InstanceNotFoundException e) { throw new ReportException(Reason.INSTANCE_NOT_FOUND, e.getMessage()); } } }
ReportExporter { public void unexportObject(Object object) { try { registry.unregister(object); } catch (InstanceNotFoundException e) { throw new ReportException(Reason.INSTANCE_NOT_FOUND, e.getMessage()); } } @Inject  ReportExporter(ReportedBeanRegistry registry, BucketIdProvider bucketIdProvider); }
ReportExporter { public void unexportObject(Object object) { try { registry.unregister(object); } catch (InstanceNotFoundException e) { throw new ReportException(Reason.INSTANCE_NOT_FOUND, e.getMessage()); } } @Inject  ReportExporter(ReportedBeanRegistry registry, BucketIdProvider bucketIdProvider); void export(Object object, boolean applicationPrefix, String namePrefix, Map<String, String> tags); void unexportObject(Object object); @Deprecated void export(String name, Object object); @Deprecated void export(ObjectName objectName, Object object); @Deprecated void unexport(String name); @Deprecated void unexport(ObjectName objectName); }
ReportExporter { public void unexportObject(Object object) { try { registry.unregister(object); } catch (InstanceNotFoundException e) { throw new ReportException(Reason.INSTANCE_NOT_FOUND, e.getMessage()); } } @Inject  ReportExporter(ReportedBeanRegistry registry, BucketIdProvider bucketIdProvider); void export(Object object, boolean applicationPrefix, String namePrefix, Map<String, String> tags); void unexportObject(Object object); @Deprecated void export(String name, Object object); @Deprecated void export(ObjectName objectName, Object object); @Deprecated void unexport(String name); @Deprecated void unexport(ObjectName objectName);  }