### Question:
ToolConfig { public static ToolConfig parse(String[] args) throws ParseException { Options opts = OPTIONS; return new ToolConfig(new DefaultParser().parse(opts, args)); } ToolConfig(CommandLine cli);  ToolConfig(Path target, boolean batch); Path getTarget(); boolean isBatch(); static ToolConfig parse(String[] args); static void printHelp(PrintStream stream, String app);  }### Answer:
@Test(expected = ParseException.class) public void testNoTargetParameter() throws ParseException { final String[] args = {}; defaultFactory.parse(args); }
@Test(expected = MissingArgumentException.class) public void testNoTargetArgument() throws ParseException { final String[] args = {"-t"}; defaultFactory.parse(args); }