### Question:
ToolConfig { public Path getTarget() { return target; } 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 public void testGetTarget() throws ParseException { final String[] args = {"-t", "/fake/dir"}; CommandLine cl = new CLIManager().parse(args); Path path = new ToolConfig(cl).getTarget(); assertEquals(2, path.getNameCount()); assertEquals("fake", path.getName(0).toString()); }