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