}
} );
logger.setLevel( Level.DEBUG );</BUG>
locator.init( root, new MockActiveHadoopConfigurationLocator( "a" ), new DefaultFileSystemManager() );
<BUG>assertEquals( 0, locator.getConfigurations().size() );
assertEquals( 2, logEvents.size() );
assertEquals( Level.WARN, logEvents.get( 0 ).getLevel() );
assertEquals( "Unable to load Hadoop Configuration from \"" + root.getURL()
+ "/a\". For more information enable debug logging.", logEvents.get( 0 ).getMessage() );
assertNull( logEvents.get( 0 ).getThrowableInformation() );
assertEquals( Level.DEBUG, logEvents.get( 1 ).getLevel() );
assertEquals( "Unable to load Hadoop Configuration from \"" + root.getURL() + "/a\".",
logEvents.get( 1 ).getMessage() );
assertNotNull( logEvents.get( 1 ).getThrowableInformation() );</BUG>
}

}
@Test (expected = ConfigurationException.class)
public void findHadoopConfigurations_errorLoadingHadoopConfig() throws Exception {
FileObject root = VFS.getManager().resolveFile( HADOOP_CONFIGURATIONS_PATH );
HadoopConfigurationLocator locator = new HadoopConfigurationLocator() {
protected HadoopConfiguration loadHadoopConfiguration( FileObject folder ) throws ConfigurationException {
throw new ConfigurationException( "test" );
}
};
locator.init( root, new MockActiveHadoopConfigurationLocator( "a" ), new DefaultFileSystemManager() );
}
