/**
* Tests the read method under normal conditions.
*/
public void testRead() {
try {
DefinitionsReader reader = new DigesterDefinitionsReader();
reader.init(new HashMap());
URL configFile = this.getClass().getClassLoader().getResource(
"org/apache/tiles/config/tiles-defs.xml");
assertNotNull("Config file not found", configFile);
InputStream source = configFile.openStream();
Map definitions = reader.read(source);
assertNotNull("Definitions not returned.", definitions);
assertNotNull("Couldn't find doc.mainLayout tile.",
(ComponentDefinition) definitions.get("doc.mainLayout"));
assertNotNull("Couldn't Find title attribute.",