### Question:
OptionParser { public Path handleTemplateOption(CommandLine cmd) { Path templatePath = Paths.get(cmd.getOptionValue("t")); if (!templatePath.toFile().isDirectory()) { throw new IllegalArgumentException("the input template path does not point to a local directory."); } System.out.print("Valid template path: "); System.out.println(cmd.getOptionValue("t")); return templatePath; } OptionParser(); Options getOptions(); Path handleTemplateOption(CommandLine cmd); Path handleConfigOption(CommandLine cmd);  }### Answer:
@Test public void handleTemplate() { OptionParser optionParser = new OptionParser(); Path dir = optionParser.handleTemplateOption(cmd); assertEquals(templateDir.toString(), dir.toString()); }