### Question:
PentahoNamespaceHandler implements NamespaceHandler { @Override public URL getSchemaLocation( String s ) { if ( PENTAHO_BLUEPRINT_SCHEMA.equals(s) ) return getClass().getResource("/pentaho-blueprint.xsd"); return null; } PentahoNamespaceHandler( BundleContext bundleContext ); @Override URL getSchemaLocation( String s ); @Override Set<Class> getManagedClasses(); @Override Metadata parse( Element element, ParserContext parserContext ); @Override ComponentMetadata decorate( Node node, ComponentMetadata componentMetadata, ParserContext parserContext ); static final String DI_PLUGIN; static final String DI_PLUGIN_EXTRA_MAPPINGS; static final String TYPE; static final String ID; static final String AUTO_PDI_PLUGIN; static final String AUTO_DI_PLUGIN_MAPPINGS; static final String PENTAHO_BLUEPRINT_SCHEMA; }### Answer:
@Test public void testGetSchemaLocation() throws Exception { pentahoNamespaceHandler = new PentahoNamespaceHandler( bundleContext ); URL url = pentahoNamespaceHandler.getSchemaLocation( PentahoNamespaceHandler.PENTAHO_BLUEPRINT_SCHEMA ); assertNotNull( url ); assert( url.getPath().contains( "pentaho-blueprint" ) ); }
@Test public void testGetOtherSchemaLocation() throws Exception { pentahoNamespaceHandler = new PentahoNamespaceHandler( bundleContext ); URL url = pentahoNamespaceHandler.getSchemaLocation( "test" ); assertNull( url ); }