expect(bindingCreator.create(foo())).andReturn(binding);
expect(binding.getDependencies()).andReturn(TestUtils.dependencyList(
new Dependency(foo(), bar(), SOURCE)));
expect(origin.isBound(bar())).andReturn(true).anyTimes();
control.replay();
DependencyExplorerOutput output = dependencyExplorer.explore(origin);
assertSame(origin, output.getPreExistingLocations().get(bar()));
assertEmpty(output.getBindingErrors());
assertEquals(1, output.getImplicitlyBoundKeys().size());
assertEquals(foo(), output.getImplicitBindings().iterator().next().getKey());
assertEquals(binding, output.getImplicitBindings().iterator().next().getValue());
DependencyGraph graph = output.getGraph();
assertContentsAnyOrder(graph.getDependenciesTargeting(foo()),
new Dependency(Dependency.GINJECTOR, foo(), SOURCE));
assertContentsAnyOrder(graph.getDependenciesTargeting(bar()),
new Dependency(foo(), bar(), SOURCE));
control.verify();