### Question:
DefaultDependencyGraph implements DependencyGraph, Cloneable { @Override public Module earliest(Coordinate coordinate) { return firstOfLevel(coordinate, Module::compareTo); } DefaultDependencyGraph(); private  DefaultDependencyGraph(DefaultDependencyGraph graph); @Override Graph<DirectedGraph.Edge<Coordinate>, Coordinate> getGraph(); @Override Module latest(Coordinate coordinate); @Override Module earliest(Coordinate coordinate); @Override Module firstOfLevel(Coordinate coordinate, Comparator<Module> comparator); @Override List<Module> getModules(Coordinate coordinate); @Override Set<UnsatisfiedDependencySet> add(Module a); @Override int size(); @Override UnsatisfiedDependencySet getUnresolvedDependencies(@NonNull Module module); @Override Set<UnsatisfiedDependencySet> getUnresolvedDependencies(Collection<Module> modules); @Override Set<UnsatisfiedDependencySet> addAll(Collection<Module> modules); @Override void remove(Module module); @Override Module get(Coordinate coordinate); @Override Collection<Module> getDependents(Coordinate coordinate); @Override Set<Module> getDependencies(Coordinate coordinate); @Override boolean contains(Coordinate coordinate); @Override Partition<DirectedGraph.Edge<Coordinate>, Coordinate> computeCycles(); @Override @SuppressWarnings({"PMD.ProperCloneImplementation", "CloneMethodReturnTypeMustMatchClassName"}) DefaultDependencyGraph clone(); @Override Iterator<Module> iterator(); @Override String toString();  }### Answer:
@Test void ensureRetrievingEarliestProducesFirstVersion() { scenario2(); val query = ModuleCoordinate.group("io.sunshower").name("sunshower-spring"); val module = graph.earliest(query); val coord = module.getCoordinate(); assertEquals(new SemanticVersion("1.0.0-SNAPSHOT"), coord.getVersion()); }
@Test void ensureRetrievingLatestProducesLastVersion() { scenario2(); val query = ModuleCoordinate.group("io.sunshower").name("sunshower-spring"); val module = graph.earliest(query); val coord = module.getCoordinate(); assertEquals(new SemanticVersion("1.0.0-SNAPSHOT"), coord.getVersion()); }