DefaultArtifact profiler = new DefaultArtifact(mrid, rmr.getPublicationDate(),
"nanning-profiler", "jar", "jar");
DefaultArtifact trace = new DefaultArtifact(mrid, rmr.getPublicationDate(),
"nanning-trace", "jar", "jar");
DownloadReport report = resolver.download(new Artifact[] {profiler, trace},
new DownloadOptions(_settings, _cache));
assertNotNull(report);
assertEquals(2, report.getArtifactsReports().length);
ArtifactDownloadReport ar = report.getArtifactReport(profiler);
assertNotNull(ar);
assertEquals(profiler, ar.getArtifact());
assertEquals(DownloadStatus.SUCCESSFUL, ar.getDownloadStatus());
ar = report.getArtifactReport(trace);
assertNotNull(ar);
assertEquals(trace, ar.getArtifact());
assertEquals(DownloadStatus.SUCCESSFUL, ar.getDownloadStatus());
// test to ask to download again, should use cache
report = resolver.download(new Artifact[] {profiler, trace}, new DownloadOptions(_settings,
_cache));
assertNotNull(report);
assertEquals(2, report.getArtifactsReports().length);