@Test public void testExecuteReturnCode() throws Exception { assertThat(executeCommandsHelper(terminal, Arrays.asList("echo hello"), "osPromptPattern").getExitStatus()) .isEqualTo(Integer.MAX_VALUE); final ArgumentCaptor<OutputStream> fileCaptor = ArgumentCaptor.forClass(OutputStream.class); verify(shell).setOutputStream(fileCaptor.capture()); fileCaptor.getValue().close(); }
public void setOutputStream(final OutputStream stream) { this.stream = stream; }
JSchSshTerminal { public void setOutputStream(final OutputStream stream) { this.stream = stream; } }
JSchSshTerminal { public void setOutputStream(final OutputStream stream) { this.stream = stream; } JSchSshTerminal();  JSchSshTerminal(final ConnectionPool pool); }
JSchSshTerminal { public void setOutputStream(final OutputStream stream) { this.stream = stream; } JSchSshTerminal();  JSchSshTerminal(final ConnectionPool pool); TerminalResponse executeCommandGroups(final List<CommandExpectationGroup> commandExpectationGroups); void setOutputStream(final OutputStream stream); void setExpectationTimeout(final long expectationTimeout); }
JSchSshTerminal { public void setOutputStream(final OutputStream stream) { this.stream = stream; } JSchSshTerminal();  JSchSshTerminal(final ConnectionPool pool); TerminalResponse executeCommandGroups(final List<CommandExpectationGroup> commandExpectationGroups); void setOutputStream(final OutputStream stream); void setExpectationTimeout(final long expectationTimeout);  }