### Question:
CommandLine { public static String run(String command) throws CommandLineException { return run(command, false); }  static String run(String command); static String run(String command, boolean verbose); static String run(String command, String workingDirectory); static String run(String command, String workingDirectory, boolean verbose);  }### Answer:
@Test public void testRunLocalCommand() throws CommandLineException { String result = CommandLine.run("date"); Calendar cal = Calendar.getInstance(); int today = cal.get(Calendar.DAY_OF_MONTH); assertTrue(result.contains(Integer.toString(today))); }
@Test(expected = CommandLineException.class) public void shouldThrowExceptionBecauseExistStatus() throws CommandLineException { CommandLine.run("this command does not exit"); }
@Test(expected = CommandLineException.class) public void shouldThrowExceptionBecauseExistStatus2() throws CommandLineException { CommandLine.run("cat arquivo_que_nao_existe"); }