PackageDocument { private List<Dependency> getDependencies(String name) { DependencyFactory factory = new DependencyFactory(); List<String> dependencies = content.getList(name); if (dependencies == null) { return Collections.emptyList(); } return dependencies.stream() .map(factory::createDependency) .collect(Collectors.toList()); } PackageDocument(File document, String source);   }
@Test void getDependencies() { Assertions.assertEquals( "[owner-one/dependency-one@1.0.0, owner-three/dependency-three@1.0.0, org.panda-lang/reposilite@2.8.1]", document.getDependencies().toString() ); }