DeclaredDependencies extends DependencyTree<ArtifactSpec> { public Collection<ArtifactSpec> getDirectDependencies() { return new LinkedHashSet<>(getDirectDeps()); }  Collection<ArtifactSpec> getDirectDependencies(); Set<ArtifactSpec> getTransientDependencies(); Collection<ArtifactSpec> getRuntimeExplicitAndTransientDependencies(); Collection<ArtifactSpec> getTransientDependencies(ArtifactSpec artifact); boolean isPresolved(); Optional<ArtifactSpec> runnerDependency(); static ArtifactSpec createSpec(String gav); static ArtifactSpec createSpec(String gav, String scope); void writeTo(File file); @Override Collection<ArtifactSpec> getDirectDeps(); void markComplete(ArtifactSpec directDep); boolean isComplete(ArtifactSpec directDep);  }
@Test public void testUnsolvedDirect() { dependencyStream().forEach(declaredDependencies::add); Collection<ArtifactSpec> directDependencies = declaredDependencies.getDirectDependencies(); Iterator<ArtifactSpec> iterator = directDependencies.iterator(); assertOrder(iterator); }