control.verify();
}
public void testEagerCycleSecondInUnresolved() throws Exception {
eagerCycleFinder.reportError(
TestUtils.dependencyList(new Dependency(Dependency.GINJECTOR, foo(), SOURCE)),
TestUtils.dependencyList(
new Dependency(foo(), baz(), SOURCE),
new Dependency(baz(), foo(), SOURCE)));
expect(origin.getDependencies()).andStubReturn(TestUtils.dependencyList(
new Dependency(Dependency.GINJECTOR, foo(), SOURCE),
new Dependency(foo(), bar(), SOURCE),
new Dependency(foo(), baz(), SOURCE)));
control.replay();
DependencyGraph graph = new DependencyGraph.Builder(origin)
.addEdge(new Dependency(Dependency.GINJECTOR, foo(), SOURCE))
.addEdge(new Dependency(foo(), bar(), SOURCE))
.addEdge(new Dependency(foo(), baz(), SOURCE))
.addEdge(new Dependency(baz(), foo(), SOURCE)).build();
assertTrue(eagerCycleFinder.findAndReportCycles(graph));
control.verify();
}