### Question:
PluginMetadataImpl implements PluginMetadata { @Override public void setBlueprint( Document blueprint ) { NodeList childNodes = blueprint.getDocumentElement().getChildNodes(); for ( int i = 0; i < childNodes.getLength(); i++ ) { Node node = this.blueprint.importNode( childNodes.item( i ), true ); this.blueprint.getDocumentElement().appendChild( node ); } } PluginMetadataImpl( File rootDirectory ); @Override ManifestUpdater getManifestUpdater(); @Override Document getBlueprint(); @Override void setBlueprint( Document blueprint ); @Override void writeBlueprint( String name, OutputStream outputStream ); @Override FileWriter getFileWriter( String path ); @Override OutputStream getFileOutputStream( String path ); @Override void addContentType( String contentType ); @Override List<String> getContentTypes(); @Override void executeAtEnd( Runnable runnable );  }### Answer:
@Test public void testSetBlueprint() throws Exception { Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); Element root = document.createElement( "blueprint" ); document.appendChild( root ); root.appendChild( document.createElement( "bean" ) ); PluginMetadataImpl pluginMetadata = new PluginMetadataImpl( mockRootDirectory ); pluginMetadata.setBlueprint( document ); assertEquals( "bean", pluginMetadata.getBlueprint().getDocumentElement().getChildNodes().item( 0 ).getNodeName() ); }