}
public void testDefaultConfigurationProviderFactory() throws NoSuchMethodException, IOException {
Method m = DefaultConfigurationProviderFactory.class
.getDeclaredMethod("getDefaultProviderClassName");
DefaultConfigurationProviderFactory factory =
EasyMock.createMock(DefaultConfigurationProviderFactory.class, new Method[] {m});
factory.getDefaultProviderClassName();
org.easymock.EasyMock.expectLastCall().andReturn("org.objectweb.celtix.some.Unknown");
EasyMock.replay(factory);
try {
factory.createDefaultProvider(null);
fail("Expected ConfigurationException not thrown.");
} catch (ConfigurationException ex) {
assertEquals("DEFAULT_PROVIDER_INSTANTIATION_EXC", ex.getCode());
}
factory = DefaultConfigurationProviderFactory.getInstance();
assertNotNull(factory.createDefaultProvider(null));
}