PublishingEndpointListener implements EndpointEventListener, EndpointListener { @Override public void endpointChanged(EndpointEvent event, String filter) { repository.endpointChanged(event); }  @Activate void start(BundleContext bctx); @Deactivate void stop(); @Override void endpointChanged(EndpointEvent event, String filter); @Override void endpointAdded(EndpointDescription endpoint, String matchedFilter); @Override void endpointRemoved(EndpointDescription endpoint, String matchedFilter);  }
@Test public void testEndpointRemovalAdding() throws KeeperException, InterruptedException { EndpointDescription endpoint = createEndpoint(); EndpointEvent event1 = new EndpointEvent(EndpointEvent.ADDED, endpoint); eli.endpointChanged(event1, null); EndpointEvent event2 = new EndpointEvent(EndpointEvent.REMOVED, endpoint); eli.endpointChanged(event2, null); verify(repository).endpointChanged(event1); verify(repository).endpointChanged(event2); }