### Question:
MavenDependencyResolver implements DependencyResolver { @Override public Dependency resolveArtifact(DependencyQuery query) { RepositorySystem system = container.getRepositorySystem(); Settings settings = container.getSettings(); List<RemoteRepository> remoteRepos = MavenConvertUtils.convertToMavenRepos(query.getDependencyRepositories(), settings); remoteRepos.addAll(MavenRepositories.getRemoteRepositories(container, settings)); DefaultRepositorySystemSession session = container.setupRepoSession(system, settings); Artifact queryArtifact = MavenConvertUtils.coordinateToMavenArtifact(query.getCoordinate()); ArtifactRequest request = new ArtifactRequest(queryArtifact, remoteRepos, null); try { ArtifactResult resolvedArtifact = system.resolveArtifact(session, request); Artifact artifact = resolvedArtifact.getArtifact(); @SuppressWarnings("unchecked") FileResource<?> artifactResource = getResourceFactory().create(FileResource.class, artifact.getFile()); return DependencyBuilder.create() .setArtifact(artifactResource) .setGroupId(artifact.getGroupId()) .setArtifactId(artifact.getArtifactId()) .setClassifier(artifact.getClassifier()) .setPackaging(artifact.getExtension()) .setVersion(artifact.getBaseVersion()); } catch (ArtifactResolutionException e) { throw new MavenOperationException(e); } } 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 testResolveArtifact() throws Exception { DependencyQuery query = DependencyQueryBuilder .create("org.jboss.forge:resources:jar:forge-addon:2.0.0.Alpha3"); Dependency artifact = resolver.resolveArtifact(query); Assert.assertNotNull(artifact); Assert.assertTrue("Artifact does not exist: " + artifact, artifact.getArtifact().exists()); }