### Question:
NpmBuildInfoExtractor implements BuildInfoExtractor<NpmProject> { static boolean isJsonOutputRequired(List<String> installationArgs) { int jsonIndex = installationArgs.indexOf("--json"); if (jsonIndex > -1) { return jsonIndex == installationArgs.size() - 1 || !installationArgs.get(jsonIndex + 1).equals("false"); } return installationArgs.contains("--json=true"); } NpmBuildInfoExtractor(ArtifactoryDependenciesClientBuilder dependenciesClientBuilder, NpmDriver npmDriver, Log logger, String module); @Override Build extract(NpmProject npmProject);  }### Answer:
@Test(dataProvider = "isJsonOutputRequiredProvider") public void isJsonOutputRequiredTest(boolean expectedResult, String[] installationArgs) { assertEquals(isJsonOutputRequired(Lists.newArrayList(installationArgs)), expectedResult); }