public class ManagedDependenciesFactoryTests {
@Test
public void getManagedDependencies() {
List<Dependency> dependencyList = new ArrayList<Dependency>();
dependencyList.add(new Dependency("g1", "a1", "1"));
dependencyList.add(new Dependency("g1", "a2", "1"));
ManagedDependencies dependencies = mock(ManagedDependencies.class);
given(dependencies.iterator()).willReturn(dependencyList.iterator());
ManagedDependenciesFactory factory = new ManagedDependenciesFactory(dependencies);
List<org.eclipse.aether.graph.Dependency> result = factory
.getManagedDependencies();