*/
@Test
public void testReloadingDetectorIsReloadingRequired()
throws ConfigurationException
{
ReloadingDetector detector =
EasyMock.createMock(ReloadingDetector.class);
EasyMock.expect(detector.isReloadingRequired()).andReturn(Boolean.TRUE);
EasyMock.expect(detector.isReloadingRequired())
.andReturn(Boolean.FALSE);
EasyMock.replay(detector);
ReloadingFileBasedConfigurationBuilderTestImpl builder =
new ReloadingFileBasedConfigurationBuilderTestImpl(detector);
builder.getConfiguration();
ReloadingDetector ctrlDetector =
builder.getReloadingController().getDetector();
assertTrue("Wrong result (1)", ctrlDetector.isReloadingRequired());
assertFalse("Wrong result (2)", ctrlDetector.isReloadingRequired());
assertSame("Wrong file handler", builder.getFileHandler(),
builder.getHandlerForDetector());
EasyMock.verify(detector);
}