### Question:
BlueprintsGraphMetaverseReader implements IMetaverseReader { @Override public List<IMetaverseNode> findNodes( String property, String value ) { Iterable<Vertex> vertices = getGraph().getVertices( property, value ); if ( vertices == null ) { return null; } List<IMetaverseNode> result = new ArrayList<IMetaverseNode>(); Iterator<Vertex> verticesIt = vertices.iterator(); while ( verticesIt.hasNext() ) { MetaverseNode node = new MetaverseNode( verticesIt.next() ); result.add( node ); } return result; } BlueprintsGraphMetaverseReader( Graph graph ); @Override IMetaverseNode findNode( String id ); @Override List<IMetaverseNode> findNodes( String property, String value ); @Override IMetaverseLink findLink( String leftNodeID, String linkType, String rightNodeID, Direction direction ); @Override Graph getMetaverse(); @Override String exportToXml(); @Override String exportFormat( String format ); void exportToStream( String format, OutputStream out ); @Override Graph search( List<String> resultTypes, List<String> startNodeIDs, boolean shortestOnly ); @Override Graph getGraph( String id );  }### Answer:
@Test public void testFindNodes() throws Exception { IMetaverseReader metaverseReader = new BlueprintsGraphMetaverseReader( graph ); List<IMetaverseNode> nodes = metaverseReader.findNodes( DictionaryConst.PROPERTY_TYPE, DictionaryConst.NODE_TYPE_DATA_COLUMN ); assertNotNull( "Node is null", nodes ); assertEquals( "Node count is wrong", 7, nodes.size() ); Set<String> ids = new HashSet<String>(); for ( IMetaverseNode node : nodes ) { ids.add( node.getStringID() ); } assertTrue( "Id is missing", ids.contains( "datasource1.table1.field1" ) ); assertTrue( "Id is missing", ids.contains( "datasource1.table1.field2" ) ); assertTrue( "Id is missing", ids.contains( "datasource1.table1.field3" ) ); assertTrue( "Id is missing", ids.contains( "datasource1.table2.field1" ) ); assertTrue( "Id is missing", ids.contains( "datasource1.table2.field2" ) ); assertTrue( "Id is missing", ids.contains( "datasource1.table2.field3" ) ); assertTrue( "Id is missing", ids.contains( "datasource1.table2.field4" ) ); nodes = metaverseReader.findNodes( DictionaryConst.PROPERTY_NAME, "Transformation: trans1.ktr" ); assertNotNull( "Node is null", nodes ); assertEquals( "Node count is wrong", 1, nodes.size() ); assertEquals( "Id is missing", "Transformation: trans1.ktr", nodes.get( 0 ).getProperty( DictionaryConst.PROPERTY_NAME ) ); }