### Question:
ConnectionEventPublisher extends ConnectionEventListener implements EventSource<T>, EventPublisher { public ConnectionEventPublisher<T> copy() { return new ConnectionEventPublisher<>(this); } ConnectionEventPublisher();  ConnectionEventPublisher(ConnectionEventPublisher<T> toCopy); @Override void onByteRead(final long bytesRead); @Override void onByteWritten(long bytesWritten); @Override void onFlushStart(); @Override void onFlushComplete(final long duration, final TimeUnit timeUnit); @Override void onWriteStart(); @Override void onWriteSuccess(final long duration, final TimeUnit timeUnit); @Override void onWriteFailed(final long duration, final TimeUnit timeUnit, final Throwable throwable); @Override void onConnectionCloseStart(); @Override void onConnectionCloseSuccess(final long duration, final TimeUnit timeUnit); @Override void onConnectionCloseFailed(final long duration, final TimeUnit timeUnit, final Throwable throwable); @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 Subscription subscribe(T listener); @Override boolean publishingEnabled(); ConnectionEventPublisher<T> copy();  }### Answer:
@Test(timeout = 60000) public void testCopy() throws Exception { ConnectionEventPublisher<MockConnectionEventListener> copy = rule.publisher.copy(); assertThat("Publisher not copied.", copy, is(not(sameInstance(rule.publisher)))); assertThat("Listeners not copied.", copy.getListeners(), is(not(sameInstance(rule.publisher.getListeners())))); }