allowing(artifactStub).getType();
will(returnValue(type));
allowing(artifactStub).getExt();
will(returnValue(extension));
}});
final ResolveEngine resolveEngineMock = context.mock(ResolveEngine.class, "engine" + name);
final ArtifactDownloadReport artifactDownloadReport = new ArtifactDownloadReport(artifactStub);
artifactDownloadReport.setLocalFile(file);
context.checking(new Expectations() {{
one(resolveEngineMock).download(with(equal(artifactStub)), with(any(DownloadOptions.class)));
will(returnValue(artifactDownloadReport));