### Question:
CompositeHttpErrorStatusListener implements HttpErrorStatusListener { @Override public void proxyErrorOccurred(Throwable cause) { listeners.forEach(listener -> listener.proxyErrorOccurred(cause)); } CompositeHttpErrorStatusListener(List<HttpErrorStatusListener> listeners); @Override void proxyErrorOccurred(Throwable cause); @Override void proxyWriteFailure(LiveHttpRequest request, LiveHttpResponse response, Throwable cause); @Override void proxyingFailure(LiveHttpRequest request, LiveHttpResponse response, Throwable cause); @Override void proxyErrorOccurred(HttpResponseStatus status, Throwable cause); @Override void proxyErrorOccurred(LiveHttpRequest request, InetSocketAddress clientAddress, HttpResponseStatus status, Throwable cause);  }### Answer:
@Test public void propagatesProxyErrorsWithCause() { IOException cause = new IOException(); listener.proxyErrorOccurred(cause); verify(delegate1).proxyErrorOccurred(cause); verify(delegate2).proxyErrorOccurred(cause); verify(delegate3).proxyErrorOccurred(cause); }
@Test public void propagatesProxyErrorsWithStatusAndCause() { IOException cause = new IOException(); listener.proxyErrorOccurred(INTERNAL_SERVER_ERROR, cause); verify(delegate1).proxyErrorOccurred(INTERNAL_SERVER_ERROR, cause); verify(delegate2).proxyErrorOccurred(INTERNAL_SERVER_ERROR, cause); verify(delegate3).proxyErrorOccurred(INTERNAL_SERVER_ERROR, cause); }
@Test public void propagatesProxyErrorsWithRequests() { LiveHttpRequest request = LiveHttpRequest.get("/foo").build(); IOException cause = new IOException(); InetSocketAddress clientAddress = InetSocketAddress.createUnresolved("127.0.0.1", 0); listener.proxyErrorOccurred(request, clientAddress, INTERNAL_SERVER_ERROR, cause); verify(delegate1).proxyErrorOccurred(request, clientAddress, INTERNAL_SERVER_ERROR, cause); verify(delegate2).proxyErrorOccurred(request, clientAddress, INTERNAL_SERVER_ERROR, cause); verify(delegate3).proxyErrorOccurred(request, clientAddress, INTERNAL_SERVER_ERROR, cause); }