Log4JConfigurationMXBeanSingleton implements Log4JConfigurationMXBean { @Override public final void setConfigurationFile(String configFile) { if (configFile == null) { throw new IllegalArgumentException("config file may not be null"); } synchronized (MONITOR) { if(this.updateFrequency != null) { throw new IllegalStateException("Can't set config file after polling has started"); } this.configFile = configFile; } configure(configFile); } Log4JConfigurationMXBeanSingleton(); static Log4JConfigurationMXBean instance(); @Override final String getConfigurationFile(); @Override final void setConfigurationFile(String configFile); @Override final Long getUpdateFrequencyMS(); @Override final void pollConfigurationFile(String file, long updateFrequencyMS); @Override final void pollConfigurationFile(long updateFrequencyMS); @Override final void updateConfigurationFile();  }
@Test public void nullConfig() { final TestConfigurator test = new TestConfigurator(); expectException(IllegalArgumentException.class, new Runnable() { @Override public void run() { test.bean().setConfigurationFile(null); } }); test.assertAll(null, null); }