### Question:
ParameterParser { public Parameter getParam(String... commandArgs) { Options commandOptions = executeOption(); CommandLineParser parser = new DefaultParser(); HelpFormatter formatter = new HelpFormatter(); CommandLine cmd; try { cmd = parser.parse(commandOptions, commandArgs); } catch (ParseException e) { PrintWriter printWriter = new PrintWriter(System.out); printWriter.append(e.getMessage()).append('\n').append('\n'); formatter.printHelp(printWriter, 80, "coverchecker.jar", "", commandOptions, 0, 0, "", true); printWriter.flush(); return null; } Parameter param = Parameter.builder() .threshold(Integer.parseInt(cmd.getOptionValue("t"))) .fileThreshold(getFileThreshold(cmd)) .githubToken(cmd.getOptionValue("g")) .diffPath(cmd.getOptionValue("d")) .coveragePath(Arrays.asList(cmd.getOptionValues("c"))) .githubUrl(cmd.getOptionValue("u", "api.github.com")) .repo(cmd.getOptionValue("r")) .diffType(cmd.getOptionValue("diff-type")) .prNumber(Integer.parseInt(getPrNumber(cmd))) .coverageType(cmd.getOptionValue(COVERAGE_TYPE_OPTION)) .build(); logger.debug("execute by {}", param); return param; }  Parameter getParam(String... commandArgs);  }### Answer:
@Test public void getFailParam() { assertNull(new ParameterParser().getParam("")); }
@Test public void getParam() { String param = "-c /path -c /path2 -d /path -t 50 -g github_token -r repo -p 3 -type cobertura --diff-type com.naver.nid.cover.github"; Parameter parameter = new ParameterParser().getParam(param.split(" ")); assertEquals(Arrays.asList("/path", "/path2"), parameter.getCoveragePath()); assertEquals("/path", parameter.getDiffPath()); assertEquals(50, parameter.getThreshold()); assertEquals("github_token", parameter.getGithubToken()); assertEquals(IGitHubConstants.HOST_API, parameter.getGithubUrl()); assertEquals("repo", parameter.getRepo()); assertEquals(3, parameter.getPrNumber()); assertEquals("cobertura", parameter.getCoverageType()); assertEquals("com.naver.nid.cover.github", parameter.getDiffType()); }