### Question:
ServerActivator implements EventListener<ServerConfigEvent> { public void close() { myEventManager.unsubscribe(ServerConfigEvent.class, this); } ServerActivator(ServerSourceControllerManager serverSourceManager, EventManager eventManager,
            IActivationListener activationListener); void activateServers(Object object); void close(); @Override void notify(ServerConfigEvent event);  }### Answer:
@SuppressWarnings("unchecked") @Test public void testClose() { ServerSourceControllerManager controllerManager = EasyMock.createNiceMock(ServerSourceControllerManager.class); IActivationListener activationListener = EasyMock.createNiceMock(IActivationListener.class); EventManager eventManager = createEventManager(); eventManager.<ServerConfigEvent>unsubscribe(EasyMock.isA(Class.class), EasyMock.isA(ServerActivator.class)); EasyMock.replay(eventManager, controllerManager, activationListener); ServerActivator activator = new ServerActivator(controllerManager, eventManager, activationListener); activator.close(); EasyMock.verify(eventManager, controllerManager, activationListener); }