@Test
public void executeCommandOnHostViaSshTestCatchIOException() throws Exception {

    configureExecuteCommandOnHostViaSshTest(sshConnectionWithHost, sshSession);
    Mockito.doThrow(IOException.class).when(sshSession).execCommand(Mockito.eq("command"));
    spy.executeCommandOnHostViaSsh("hostIp", "command");
    verifyExecuteCommandOnHostViaSshTestCalledMethods(sshConnectionWithHost, sshSession, 0);
}