### Question:
EventManager { public void unregister(EventObserver<?> observer){ for (Map.Entry<Class, Set<EventObserver>> entry : observers.entrySet()) { entry.getValue().remove(observer); } }  void register(Class<T> event, EventObserver<T> observer); void trigger(Object event); void unregister(EventObserver<?> observer);  }### Answer:
@Test public void testUnregister(){ TargetEventTriggered trigger = new TargetEventTriggered(); eventManager.register(ObservesEvent.class, trigger); eventManager.unregister(trigger); eventManager.trigger(new ObservesEvent()); assertFalse(trigger.isTriggered()); }