PipWrapper { void searchDownloadInfo(Set<PipInstalledPackage> _packs, String _out) throws IOException { if (_packs != null) for (PipInstalledPackage pack : _packs) this.searchDownloadInfo(pack, _out); } PipWrapper();  PipWrapper(Path _path_to_pip, Path _log_dir); boolean isAvailable(); Set<PipInstalledPackage> installPackages(Path _project); Set<PipInstalledPackage> getFreezePackages(); Set<PipInstalledPackage> getListPackages();  }
@Test public void testParsePipInstallOutput() throws IOException, ProcessWrapperException { final String out = FileUtil.readFile("./src/test/resources/pip-install-out.txt"); final Set<PipInstalledPackage> packs = new HashSet<PipInstalledPackage>(); final PipInstalledPackage werkzeug = new PipInstalledPackage("Werkzeug", "0.12.2"); packs.add(werkzeug); final PipInstalledPackage ms = new PipInstalledPackage("MarkupSafe", "1.0"); packs.add(ms); final PipInstalledPackage isdang = new PipInstalledPackage("itsdangerous", "0.24"); packs.add(isdang); final PipWrapper pw = new PipWrapper(); pw.searchDownloadInfo(packs, out); assertTrue(werkzeug.getDownloadUrl() != null); assertTrue(ms.getDownloadUrl() != null); assertTrue(isdang.getDownloadUrl() != null); }