EventBus { public synchronized EventBus removeEndpoint(final String endPoint) { checkEndPointIsValid(endPoint); final String trimmedEndPoint = endPoint.trim(); endPointsAndActorsMapping.remove(trimmedEndPoint); return this; } private  EventBus(); static synchronized EventBus getInstance(); synchronized EventBus subscribe(final String endPoint, final Actor actor); synchronized EventBus unsubscribe(final String endPoint, final Actor actor); synchronized EventBus removeEndpoint(final String endPoint); void broadcast(final String endPoint, final Object message);  }
@Test public void removeEndpoint() { EventBus.getInstance().subscribe(ENDPOINT_3, SUPPORT_MESSAGE_ACTOR_1); EventBus.getInstance().removeEndpoint(ENDPOINT_3); EventBus.getInstance().broadcast(ENDPOINT_3, "Test"); assertFalse(SUPPORT_MESSAGE_ACTOR_1.gotMessage); }