@Test(dataProvider = "extractAlreadyInstalledPackageProvider") public void extractAlreadyInstalledPackageTest(String line, Map<String, String> expectedDepMap) { Map<String, String> downloadedDependencies = new HashMap<>(); Matcher matcher = INSTALLED_PACKAGE_PATTERN.matcher(line); matcher.find(); PipLogParser.extractAlreadyInstalledPackage(downloadedDependencies, matcher, log); assertEquals(downloadedDependencies.keySet(), expectedDepMap.keySet()); assertEquals(downloadedDependencies.values(), expectedDepMap.values()); }
static void extractAlreadyInstalledPackage(Map<String, String> downloadedDependencies, Matcher matcher, Log logger) { downloadedDependencies.put(StringUtils.lowerCase(matcher.group(1)), ""); logger.debug(String.format("Found package: %s already installed", matcher.group(1))); }
PipLogParser { static void extractAlreadyInstalledPackage(Map<String, String> downloadedDependencies, Matcher matcher, Log logger) { downloadedDependencies.put(StringUtils.lowerCase(matcher.group(1)), ""); logger.debug(String.format("Found package: %s already installed", matcher.group(1))); } }
PipLogParser { static void extractAlreadyInstalledPackage(Map<String, String> downloadedDependencies, Matcher matcher, Log logger) { downloadedDependencies.put(StringUtils.lowerCase(matcher.group(1)), ""); logger.debug(String.format("Found package: %s already installed", matcher.group(1))); }  }
PipLogParser { static void extractAlreadyInstalledPackage(Map<String, String> downloadedDependencies, Matcher matcher, Log logger) { downloadedDependencies.put(StringUtils.lowerCase(matcher.group(1)), ""); logger.debug(String.format("Found package: %s already installed", matcher.group(1))); }   }
PipLogParser { static void extractAlreadyInstalledPackage(Map<String, String> downloadedDependencies, Matcher matcher, Log logger) { downloadedDependencies.put(StringUtils.lowerCase(matcher.group(1)), ""); logger.debug(String.format("Found package: %s already installed", matcher.group(1))); }    }