private final JUnit4Mockery context = new JUnit4Mockery();
private final SelfResolvingDependencyFactory factory = new SelfResolvingDependencyFactory(new AsmBackedClassGenerator());
@Test
public void createsADependencyFromAFileCollectionNotation() {
FileCollection collection = context.mock(FileCollection.class);
Dependency dependency = factory.createDependency(Dependency.class, collection);
assertThat(dependency, instanceOf(DefaultSelfResolvingDependency.class));
DefaultSelfResolvingDependency selfResolvingDependency = (DefaultSelfResolvingDependency) dependency;
assertThat(selfResolvingDependency.getSource(), sameInstance(collection));