Parser { public static Executable parse(String command) { Objects.requireNonNull(command); command = command.trim().replaceAll(" +", " "); String[] commands = command.split(" "); return parse(commands); }  static Executable parse(String command); static Executable parse(String[] commands);  }
@Test(expected = NotCommandError.class) public void not_command() { String str = "ss"; Parser.parse(str); }
@Test(expected = NoArgumentError.class) public void no_argument() { String str = "coap"; Parser.parse(str); }
@Test(expected = NotArgumentError.class) public void not_argument() { String str = "coap --s"; Parser.parse(str); }
@Test(expected = NoValueOfArgumentError.class) public void no_argument_value() { String str = "coap --operation"; Parser.parse(str); }