System.setProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY, CONFIG);
System.setProperty("log4j.level", "debug");
System.setProperty("log.level", "debug");
try {
final LoggerContext ctx = (LoggerContext) LogManager.getContext();
ctx.reconfigure();
final Configuration config = ctx.getConfiguration();
assertTrue("Configuration is not an XMLConfiguration", config instanceof XMLConfiguration);
} finally {
System.clearProperty("log4j.level");
System.clearProperty("log.level");