@Test public void close () throws Exception { SSHClient mockClient = Mockito.mock(SSHClient.class); doReturn(mockClient).when(chaosSSHClient).getSshClient(); chaosSSHClient.close(); verify(mockClient, times(1)).close(); }
@Override public void close () throws IOException { try { getSshClient().close(); } catch (ChaosException ignored) { } }
ChaosSSHClient implements SSHClientWrapper { @Override public void close () throws IOException { try { getSshClient().close(); } catch (ChaosException ignored) { } } }
ChaosSSHClient implements SSHClientWrapper { @Override public void close () throws IOException { try { getSshClient().close(); } catch (ChaosException ignored) { } }  }
ChaosSSHClient implements SSHClientWrapper { @Override public void close () throws IOException { try { getSshClient().close(); } catch (ChaosException ignored) { } }  @Override ShellClient connect(int connectionTimeout); @Override void close(); @Override SSHClientWrapper withSSHCredentials(SSHCredentials sshCredentials); @Override SSHClientWrapper withEndpoint(String hostname); @Override SSHClientWrapper withEndpoint(String hostname, Integer portNumber); @Override SSHClientWrapper withRunningDirectory(String runningDirectory); @Override String runResource(Resource resource); @Override ShellOutput runCommand(String command); }
ChaosSSHClient implements SSHClientWrapper { @Override public void close () throws IOException { try { getSshClient().close(); } catch (ChaosException ignored) { } }  @Override ShellClient connect(int connectionTimeout); @Override void close(); @Override SSHClientWrapper withSSHCredentials(SSHCredentials sshCredentials); @Override SSHClientWrapper withEndpoint(String hostname); @Override SSHClientWrapper withEndpoint(String hostname, Integer portNumber); @Override SSHClientWrapper withRunningDirectory(String runningDirectory); @Override String runResource(Resource resource); @Override ShellOutput runCommand(String command);  }