HTTPEventListenerFactory implements EventListener.Factory { @Override public EventListener create(Call call) { return new Listener(); }  @Override EventListener create(Call call);  }
@Test void create() { Call call = mock(Call.class); Proxy proxy = mock(Proxy.class); EventListener listener = factory.create(call); listener.dnsStart(call, "domain"); listener.dnsEnd(call, "domain", List.of()); listener.connectStart(call, new InetSocketAddress(8443), proxy); listener.connectEnd(call, new InetSocketAddress(8443), proxy, Protocol.HTTP_2); }