null);
assertNotNull("rewrite.test definition not found.", definition);
assertEquals("Incorrect initial template value", "/test.jsp",
definition.getTemplateAttribute().getValue());
RefreshMonitor reloadable = (RefreshMonitor) definitionDao;
assertEquals("Factory should be fresh.", false, reloadable
.refreshRequired());
// Make sure the system actually updates the timestamp.
Thread.sleep(SLEEP_MILLIS);
// Set up multiple data sources.
xml = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n"
+ "<!DOCTYPE tiles-definitions PUBLIC "
+ "\"-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN\" "
+ "\"http://tiles.apache.org/dtds/tiles-config_2_0.dtd\">\n\n"
+ "<tiles-definitions>"
+ "<definition name=\"rewrite.test\" template=\"/newtest.jsp\">"
+ "<put-attribute name=\"testparm\" value=\"testval\"/>"
+ "</definition>" + "</tiles-definitions>";
file = new File(uri);
fileOut = new FileOutputStream(file);
writer = new BufferedWriter(new OutputStreamWriter(fileOut));
writer.write(xml);
writer.close();
file = new File(uri);
assertEquals("Factory should be stale.", true, reloadable
.refreshRequired());
}