LocalCommand implements ICommand { @Override public ShellCommandResult execShellCommand(String strCommand) throws IOException, InterruptedException { return execShellCommand(strCommand, null); } LocalCommand(); @Override ShellCommandResult execShellCommand(String strCommand); @Override ShellCommandResult execShellCommand(String strCommand, String workingDir); @Override void copy(String sourcePath, String targetPath); @Override String getImplementationType(); @Override void disconnect();  }
@Test public void testExecShellCommand() throws Exception { if (System.getProperty("os.name").toLowerCase().contains("win")) return; assertNotNull(cmd); ShellCommandResult res = cmd.execShellCommand("echo Test"); assertEquals(0, res.getExitStatus()); assertEquals("Test\n", res.getResult()); }