@Test
public void testRunInFossologyViaSsh2() throws Exception {

    InputStream stdin = mock(InputStream.class);
    OutputStream stdout = mock(OutputStream.class);
    final int exitCode = fossologySshConnector.runInFossologyViaSsh("cmd", stdin, stdout);
    assertThat(exitCode, greaterThanOrEqualTo(0));
    verify(jSchSessionProvider).getSession(connectionTimeout);
    verify(channel, atLeastOnce()).disconnect(); // isConnected is mocked: it is disconnected twice
    verify(jSchSessionProvider, atLeastOnce()).closeSession(session); // isConnected is mocked: it is disconnected twice
}