{
throw (TransferFailedException) new TransferFailedException( "" );
}
};
TransferListener listener = createMock( TransferListener.class );
listener.transferInitiated( anyObject( TransferEvent.class ) );
TransferEvent transferEvent =
new TransferEvent( wagon, new Resource( "resource" ), new TransferFailedException( "" ),
TransferEvent.REQUEST_PUT );
listener.transferError( transferEvent );
replay( listener );
wagon.connect( repository );
wagon.addTransferListener( listener );
try