new MemoryRepositoryDependencyGraphBuilder();
MemoryRepository repository = new MavenProjectInfoReportsPluginMemoryRepository();
graphBuilder.setMemoryRepository( repository );
// Create the factory, and add the test resolver.
DependencyGraphFactory factory = new DependencyGraphFactory();
factory.setGraphBuilder( graphBuilder );
factory.setDesiredScope( DependencyScope.TEST );
// Get the model to resolve from
VersionedReference rootRef = toVersionedReference( "org.apache.maven.plugins:maven-project-info-reports-plugin:2.1-SNAPSHOT");
// Perform the resolution.
DependencyGraph graph = factory.getGraph( rootRef );
// Test the results.
assertNotNull( "Graph shouldn't be null.", graph );
String expectedRootRef = "org.apache.maven.plugins:maven-project-info-reports-plugin:2.1-SNAPSHOT";