public void givenKnownPackageNameIsUsedWithPackageManager_WhenPackageIsBuiltAndRootPackagesAreRequested_ThenRootPackagesAreReturned() {
// Given
List<MetaPackage> expectedRootPackages = Arrays.asList(new MetaPackage("com"));
// When
PackageManager packageManager = new PackageManager();
packageManager.buildPackage("com.sun.java");
List<MetaPackage> actualRootPackages = packageManager.getRootPackages();
// Then
assertThat(actualRootPackages, is(equalTo(expectedRootPackages)));
}