reqs.add(newImportedPackage("a", "2.0.0"));
reqs.add(newImportedPackage("a", "3.0.0"));
reqs.add(newImportedPackage("b", "1.0.0"));
reqs.add(newImportedPackage("b", "2.0.0"));
reqs.add(newImportedPackage("c", "1.0.0"));
PackageRequirementMerger merger = new PackageRequirementMerger(reqs);
Assert.assertTrue(merger.isMergeSuccessful());
Assert.assertTrue(merger.getInvalidRequirements().isEmpty());
Collection<ImportedPackage> result = merger.getMergedRequirements();
Collection<ImportedPackage> expected = new ArrayList<ImportedPackage>();
expected.add(newImportedPackage("a", "3.0.0"));
expected.add(newImportedPackage("b", "2.0.0"));
expected.add(newImportedPackage("c", "1.0.0"));
Assert.assertTrue(result.toString(), isEqual(result, expected));