### Question:
HttpServerEventPublisher extends HttpServerEventsListener implements EventSource<HttpServerEventsListener>, EventPublisher { public HttpServerEventPublisher copy(TcpServerEventPublisher newTcpDelegate) { return new HttpServerEventPublisher(newTcpDelegate, listeners.copy()); } HttpServerEventPublisher(TcpServerEventPublisher tcpDelegate);  HttpServerEventPublisher(TcpServerEventPublisher tcpDelegate, ListenersHolder<HttpServerEventsListener> l); @Override void onNewRequestReceived(); @Override void onRequestHandlingStart(final long duration, final TimeUnit timeUnit); @Override void onRequestHandlingSuccess(final long duration, final TimeUnit timeUnit); @Override void onRequestHandlingFailed(final long duration, final TimeUnit timeUnit, final Throwable throwable); @Override void onRequestHeadersReceived(); @Override void onRequestContentReceived(); @Override void onRequestReceiveComplete(final long duration, final TimeUnit timeUnit); @Override void onResponseWriteStart(); @Override void onResponseWriteSuccess(final long duration, final TimeUnit timeUnit, final int responseCode); @Override void onResponseWriteFailed(final long duration, final TimeUnit timeUnit, final Throwable throwable); @Override void onConnectionCloseFailed(long duration, TimeUnit timeUnit,
                                        Throwable throwable); @Override void onConnectionCloseSuccess(long duration, TimeUnit timeUnit); @Override void onConnectionCloseStart(); @Override void onWriteFailed(long duration, TimeUnit timeUnit, Throwable throwable); @Override void onWriteSuccess(long duration, TimeUnit timeUnit); @Override void onWriteStart(); @Override void onFlushComplete(long duration, TimeUnit timeUnit); @Override void onFlushStart(); @Override void onByteRead(long bytesRead); @Override void onByteWritten(long bytesWritten); @Override void onConnectionHandlingFailed(long duration, TimeUnit timeUnit,
                                           Throwable throwable); @Override void onConnectionHandlingSuccess(long duration, TimeUnit timeUnit); @Override void onConnectionHandlingStart(long duration, TimeUnit timeUnit); @Override void onCustomEvent(Object event); @Override void onCustomEvent(Object event, long duration, TimeUnit timeUnit); @Override void onCustomEvent(Object event, long duration, TimeUnit timeUnit, Throwable throwable); @Override void onCustomEvent(Object event, Throwable throwable); @Override void onNewClientConnected(); @Override boolean publishingEnabled(); @Override Subscription subscribe(HttpServerEventsListener listener); HttpServerEventPublisher copy(TcpServerEventPublisher newTcpDelegate);  }### Answer:
@Test(timeout = 60000) public void testCopy() throws Exception { HttpServerEventPublisher copy = rule.publisher.copy(rule.publisher.getTcpDelegate().copy()); assertThat("Publisher not copied.", copy, is(not(sameInstance(rule.publisher)))); assertThat("Listeners not copied.", copy.getListeners(), is(not(sameInstance(rule.publisher.getListeners())))); assertThat("Delegate not copied.", copy.getTcpDelegate(), is(not(sameInstance(rule.publisher.getTcpDelegate())))); }