SshHelper { protected static Session openConnectionSession(Connection conn) throws IOException, InterruptedException { Session sess = conn.openSession(); Thread.sleep(WAITING_OPEN_SSH_SESSION); return sess; }  static Pair<Boolean, String> sshExecute(String host, int port, String user, File pemKeyFile, String password, String command); static void scpTo(String host, int port, String user, File pemKeyFile, String password, String remoteTargetDirectory, String localFile, String fileMode); static void scpTo(String host, int port, String user, File pemKeyFile, String password, String remoteTargetDirectory, byte[] data, String remoteFileName,
            String fileMode); static void scpTo(String host, int port, String user, File pemKeyFile, String password, String remoteTargetDirectory, String localFile, String fileMode,
            int connectTimeoutInMs, int kexTimeoutInMs); static void scpTo(String host, int port, String user, File pemKeyFile, String password, String remoteTargetDirectory, byte[] data, String remoteFileName,
            String fileMode, int connectTimeoutInMs, int kexTimeoutInMs); static Pair<Boolean, String> sshExecute(String host, int port, String user, File pemKeyFile, String password, String command, int connectTimeoutInMs,
            int kexTimeoutInMs,
            int waitResultTimeoutInMs);  }
@Test public void openConnectionSessionTest() throws IOException, InterruptedException { Connection conn = Mockito.mock(Connection.class); PowerMockito.mockStatic(Thread.class); SshHelper.openConnectionSession(conn); Mockito.verify(conn).openSession(); PowerMockito.verifyStatic(); Thread.sleep(Mockito.anyLong()); }