### Question:
AssessmentTool { static Options createOptions() { final Options options = new Options(); final Option templateOption = new Option("t", "template", true, "The word template file-path to use"); templateOption.setRequired(true); options.addOption(templateOption); final Option propertiesOption = new Option("p", "properties", true, "The properties file-path containing the variables"); propertiesOption.setRequired(true); options.addOption(propertiesOption); final Option outputFileOption = new Option("o", "output", true, "The output file name/path"); outputFileOption.setRequired(true); options.addOption(outputFileOption); final Option replaceFileOption = new Option("r", "replace", true, "Replace output file if existing"); replaceFileOption.setRequired(false); replaceFileOption.setArgs(0); options.addOption(replaceFileOption); return options; } AssessmentTool();   }### Answer:
@Test public void testCreateOptions() { final Options options = AssessmentTool.createOptions(); assertNotNull(options); assertEquals(4, options.getOptions().size()); final Option templateOption = options.getOption("t"); assertNotNull(templateOption); assertEquals("template", templateOption.getLongOpt()); assertTrue(templateOption.isRequired()); assertTrue(templateOption.hasArg()); assertEquals("The word template file-path to use", templateOption.getDescription()); final Option propertiesOption = options.getOption("p"); assertNotNull(propertiesOption); assertEquals("properties", propertiesOption.getLongOpt()); assertTrue(propertiesOption.isRequired()); assertTrue(propertiesOption.hasArg()); assertEquals("The properties file-path containing the variables", propertiesOption.getDescription()); final Option outputOption = options.getOption("o"); assertNotNull(outputOption); assertEquals("output", outputOption.getLongOpt()); assertTrue(outputOption.isRequired()); assertTrue(outputOption.hasArg()); assertEquals("The output file name/path", outputOption.getDescription()); final Option replaceOption = options.getOption("r"); assertNotNull(replaceOption); assertEquals("replace", replaceOption.getLongOpt()); assertFalse(replaceOption.isRequired()); assertFalse(replaceOption.hasArg()); assertEquals("Replace output file if existing", replaceOption.getDescription()); }