AbstractWagon implements Wagon { @Override public final void disconnect() throws ConnectionException { this.sessionListenerSupport.fireSessionDisconnecting(); try { disconnectFromRepository(); this.sessionListenerSupport.fireSessionLoggedOff(); this.sessionListenerSupport.fireSessionDisconnected(); } catch (ConnectionException e) { this.sessionListenerSupport.fireSessionConnectionRefused(); 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 disconnect() throws ConnectionException { this.wagon.disconnect(); verify(this.sessionListenerSupport).fireSessionDisconnecting(); verify(this.wagon).disconnectFromRepository(); verify(this.sessionListenerSupport).fireSessionLoggedOff(); verify(this.sessionListenerSupport).fireSessionDisconnected(); }