### Question:
MavenDependencyResolver implements DependencyResolver { @Override public List<Coordinate> resolveVersions(DependencyQuery query) { VersionRangeResult r = getVersions(query); List<Coordinate> result = new ArrayList<>(); Predicate<Dependency> filter = query.getDependencyFilter(); for (Version v : r.getVersions()) { CoordinateBuilder coord = CoordinateBuilder.create(query.getCoordinate()).setVersion(v.toString()); DependencyBuilder versionedDep = DependencyBuilder.create().setCoordinate(coord); if (filter == null || filter.accept(versionedDep)) { result.add(coord); } } return result; } MavenDependencyResolver();  MavenDependencyResolver(ResourceFactory resourceFactory); @Override Set<Dependency> resolveDependencies(DependencyQuery query); @Override List<Coordinate> resolveVersions(DependencyQuery query); @Override Dependency resolveArtifact(DependencyQuery query); @Override org.jboss.forge.addon.dependencies.DependencyNode resolveDependencyHierarchy(final DependencyQuery query); @Override DependencyMetadata resolveDependencyMetadata(final DependencyQuery query);  }### Answer:
@Test public void testResolveVersions() throws Exception { DependencyQuery query = DependencyQueryBuilder.create(CoordinateBuilder .create("org.jboss.forge:dependencies-api")); List<Coordinate> versions = resolver.resolveVersions(query); Assert.assertNotNull(versions); Assert.assertFalse(versions.isEmpty()); }
@Test public void testResolveVersions2() throws Exception { DependencyQuery query = DependencyQueryBuilder.create(CoordinateBuilder .create("org.jboss.forge.addon:maven-api")); List<Coordinate> versions = resolver.resolveVersions(query); Assert.assertNotNull(versions); Assert.assertFalse(versions.isEmpty()); }
@Test public void testResolveVersionsDependency() throws Exception { DependencyQuery query = DependencyQueryBuilder.create(CoordinateBuilder .create("org.jboss.forge:resources-api")); List<Coordinate> versions = resolver.resolveVersions(query); Assert.assertNotNull(versions); Assert.assertFalse(versions.isEmpty()); }