* Tests to watch a configuration file in a jar. In this case the jar file
* itself should be monitored.
*/
public void testFromJar() throws Exception
{
XMLConfiguration config = new XMLConfiguration();
// use some jar: URL
config.setURL(new URL("jar:" + new File("conf/resources.jar").getAbsoluteFile().toURL() + "!/test-jar.xml"));
FileChangedReloadingStrategy strategy = new FileChangedReloadingStrategy();
config.setReloadingStrategy(strategy);
File file = strategy.getFile();
assertNotNull("Strategy's file is null", file);
assertEquals("Strategy does not monitor the jar file", "resources.jar", file.getName());
}