context.checking(new Expectations() {{
allowing(artifactSource).create();
will(returnValue(file));
}});
final ResolvedDependency resolvedDependency = context.mock(ResolvedDependency.class);
final ResolvedModuleVersion version = context.mock(ResolvedModuleVersion.class);
context.checking(new Expectations() {{
allowing(resolvedDependency).getModule();
will(returnValue(version));
allowing(version).getId();
will(returnValue(new DefaultModuleVersionIdentifier("group", name, "1.2")));