### Question:
EventDispatcher { public void dispatchResponseEvent(Event event) { XRayHandlerInterface xrayHandler = getHandler(event); if (xrayHandler != null) { xrayHandler.handleResponse(event); } } EventDispatcher(); void addHandler(String origin, XRayHandlerInterface handler); void dispatchRequestEvent(Event event); void dispatchResponseEvent(Event event);  }### Answer:
@Test public void testDispatchResponse() { ServiceActivityRequestEvent serviceRequestEvent = mock(ServiceActivityRequestEvent.class); ServiceActivityResponseEvent serviceResponseEvent = new ServiceActivityResponseEvent(ORIGIN, SERVICE, OPERATION, serviceRequestEvent); eventDispatcher.dispatchResponseEvent(serviceResponseEvent); verify(mockHandler, times(1)).handleResponse(serviceResponseEvent); }