### Question:
EventBridge implements EventListener { public void shutdown() throws Exception { this.externalEventSource = null; if (listeners != null && eventManager != null) { for (SubjectListener listener : listeners) { eventManager.removeListener(listener, listener.subject); } eventManager = null; listeners = null; } shutdownExternal(); } EventBridge(EventSubject localSubject, String externalSubject);  EventBridge(Collection<EventSubject> localSubjects, String externalSubject); static String convertToExternalSubject(EventSubject localSubject); String getExternalSubject(); boolean isRunning(); Collection<EventSubject> getLocalSubjects(); EventManager getEventManager(); Object getExternalEventSource(); boolean receivesLocalEvents(); boolean receivesExternalEvents(); void startup(EventManager eventManager, int mode); void startup(EventManager eventManager, int mode, Object localEventSource); void startup(
            EventManager eventManager,
            int mode,
            Object localEventSource,
            Object remoteEventSource); void shutdown(); static final int RECEIVE_LOCAL; static final int RECEIVE_EXTERNAL; static final int RECEIVE_LOCAL_EXTERNAL; }### Answer:
@Test public void testShutdown() throws Exception { EventSubject local = EventSubject .getSubject(EventBridgeTest.class, "testInstall"); String external = "externalSubject"; TestBridge bridge = new TestBridge(local, external); DefaultEventManager manager = new DefaultEventManager(); managersToClean.add(manager); bridge.startup(manager, EventBridge.RECEIVE_LOCAL_EXTERNAL); bridge.shutdown(); assertNull(bridge.eventManager); assertEquals(1, bridge.startupCalls); assertEquals(1, bridge.shutdownCalls); }