//GIVEN
Collection<Nupkg> idList = new ArrayList<>();
idList.add(createNupkg("A", "1.1.1"));
idList.add(createNupkg("A", "1.1.2"));
idList.add(createNupkg("A", "1.2.1"));
Nupkg lastA = createNupkg("A", "2.1.1");
idList.add(lastA);
idList.add(createNupkg("B", "2.1.1"));
Nupkg lastB = createNupkg("B", "5.1.1");
idList.add(lastB);
//WHEN
Collection<Nupkg> result = ClassicPackageSource.extractLastVersion(idList);
Nupkg[] resArr = result.toArray(new Nupkg[0]);
Arrays.sort(resArr, new Comparator<Nupkg>() {