### Question:
ChromeDevToolsServiceImpl implements ChromeDevToolsService, Consumer<String>, AutoCloseable { @Override public EventListener addEventListener( String domainName, String eventName, EventHandler eventHandler, Class<?> eventType) { String name = domainName + "." + eventName; EventListenerImpl eventListener = new EventListenerImpl(name, eventHandler, eventType, this); eventNameToHandlersMap.computeIfAbsent(name, this::createEventHandlerSet).add(eventListener); return eventListener; } ChromeDevToolsServiceImpl(
      WebSocketService webSocketService, ChromeDevToolsServiceConfiguration configuration); void setChromeService(ChromeServiceImpl chromeService); void setChromeTab(ChromeTab chromeTab); @Override T invoke(String returnProperty, Class<T> clazz, MethodInvocation methodInvocation); @Override T invoke(
      String returnProperty,
      Class<T> clazz,
      Class<?>[] returnTypeClasses,
      MethodInvocation methodInvocation); @Override void close(); @Override boolean isClosed(); @Override void waitUntilClosed(); @Override EventListener addEventListener(
      String domainName, String eventName, EventHandler eventHandler, Class<?> eventType); @Override void removeEventListener(EventListener eventListener); @Override void accept(String message);  }### Answer:
@Test public void testAddEventListener() { EventHandler<String> eventHandler = event -> {}; EventListener eventListener = service.addEventListener("domain", "event", eventHandler, String.class); assertNotNull(eventListener); assertEquals(eventHandler, ((EventListenerImpl) eventListener).getHandler()); assertEquals("domain.event", ((EventListenerImpl) eventListener).getKey()); assertEquals(String.class, ((EventListenerImpl) eventListener).getParamType()); service.removeEventListener(eventListener); }