DependencyResolver extends AbstractDependencyResolver { public List<File> load(String artifact) throws RepositoryException, IOException { return load(artifact, new LinkedList<String>()); } DependencyResolver(String localRepoPath); List<File> load(String artifact); List<File> load(String artifact, String destPath); synchronized List<File> load(String artifact, Collection<String> excludes); List<File> load(String artifact, Collection<String> excludes, String destPath); @Override List<ArtifactResult> getArtifactsWithDep(String dependency,
      Collection<String> excludes);  }
@Test public void testLoad() throws Exception { resolver.load("com.databricks:spark-csv_2.10:1.3.0", testCopyPath); assertEquals(new File(home + "/" + testCopyPath).list().length, 4); FileUtils.cleanDirectory(new File(home + "/" + testCopyPath)); resolver.load("com.databricks:spark-csv_2.10:1.3.0", Collections.singletonList("org.scala-lang:scala-library"), testCopyPath); assertEquals(new File(home + "/" + testCopyPath).list().length, 3); FileUtils.cleanDirectory(new File(home + "/" + testCopyPath)); resolver.addRepo("sonatype", "https: resolver.load("com.agimatec:agimatec-validation:0.9.3", testCopyPath); assertEquals(new File(home + "/" + testCopyPath).list().length, 8); resolver.delRepo("sonatype"); exception.expect(RepositoryException.class); resolver.load("com.agimatec:agimatec-validation:0.9.3", testCopyPath); }