StandardTransferListenerSupport implements TransferListenerSupport { @Override public void fireTransferError(Resource resource, int requestType, Exception exception) { TransferEvent event = new TransferEvent(this.wagon, resource, exception, requestType); for (TransferListener transferListener : this.transferListeners) { transferListener.transferError(event); } } StandardTransferListenerSupport(Wagon wagon); @Override void addTransferListener(TransferListener transferListener); @Override void removeTransferListener(TransferListener transferListener); @Override boolean hasTransferListener(TransferListener transferListener); @Override void fireTransferInitiated(Resource resource, int requestType); @Override void fireTransferStarted(Resource resource, int requestType); @Override void fireTransferProgress(Resource resource, int requestType, byte[] buffer, int length); @Override void fireTransferCompleted(Resource resource, int requestType); @Override void fireTransferError(Resource resource, int requestType, Exception exception);  }
@Test public void fireTransferError() { IOException exception = new IOException(); this.transferListenerSupport.fireTransferError(this.resource, REQUEST_TYPE, exception); verify(this.transferListener).transferError(eq(new TransferEvent(this.wagon, this.resource, exception, REQUEST_TYPE))); }