AbstractWagon implements Wagon { @Override public final void get(String resourceName, File destination) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException { Resource resource = new Resource(resourceName); this.transferListenerSupport.fireTransferInitiated(resource, TransferEvent.REQUEST_GET); this.transferListenerSupport.fireTransferStarted(resource, TransferEvent.REQUEST_GET); try { getResource(resourceName, destination, new StandardTransferProgress(resource, TransferEvent.REQUEST_GET, this.transferListenerSupport)); this.transferListenerSupport.fireTransferCompleted(resource, TransferEvent.REQUEST_GET); } catch (TransferFailedException | ResourceDoesNotExistException | AuthorizationException e) { this.transferListenerSupport.fireTransferError(resource, TransferEvent.REQUEST_GET, e); throw e; } } protected  AbstractWagon(boolean supportsDirectoryCopy); protected  AbstractWagon(boolean supportsDirectoryCopy, SessionListenerSupport sessionListenerSupport,
                            TransferListenerSupport transferListenerSupport); @Override final void addSessionListener(SessionListener sessionListener); @Override final boolean hasSessionListener(SessionListener sessionListener); @Override final void removeSessionListener(SessionListener sessionListener); @Override final void addTransferListener(TransferListener transferListener); @Override final boolean hasTransferListener(TransferListener transferListener); @Override final void removeTransferListener(TransferListener transferListener); @Override final Repository getRepository(); @Override final boolean isInteractive(); @Override final void setInteractive(boolean interactive); @Override final void connect(Repository source); @Override final void connect(Repository source, ProxyInfo proxyInfo); @Override final void connect(Repository source, AuthenticationInfo authenticationInfo); @Override final void connect(Repository source, ProxyInfoProvider proxyInfoProvider); @Override final void connect(Repository source, AuthenticationInfo authenticationInfo, ProxyInfo proxyInfo); @Override final void connect(Repository source, AuthenticationInfo authenticationInfo,
                              ProxyInfoProvider proxyInfoProvider); @Override final void disconnect(); @Override final void get(String resourceName, File destination); @Override final List<String> getFileList(String destinationDirectory); @Override final boolean getIfNewer(String resourceName, File destination, long timestamp); @Override final void openConnection(); @Override final void put(File source, String destination); @Override final void putDirectory(File sourceDirectory, String destinationDirectory); @Override final boolean resourceExists(String resourceName); @Override final boolean supportsDirectoryCopy(); @Override final int getReadTimeout(); @Override final void setReadTimeout(int readTimeout); @Override final int getTimeout(); @Override final void setTimeout(int timeout);  }
@Test public void get() throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException { this.wagon.get("foo", new File("bar")); verify(this.transferListenerSupport).fireTransferInitiated(new Resource("foo"), TransferEvent.REQUEST_GET); verify(this.transferListenerSupport).fireTransferStarted(new Resource("foo"), TransferEvent.REQUEST_GET); verify(this.wagon).getResource(eq("foo"), eq(new File("bar")), any(TransferProgress.class)); verify(this.transferListenerSupport).fireTransferCompleted(new Resource("foo"), TransferEvent.REQUEST_GET); }