"org/apache/tiles/config/defs1.xml");
URL url2 = this.getClass().getClassLoader().getResource(
"org/apache/tiles/config/defs2.xml");
URL url3 = this.getClass().getClassLoader().getResource(
"org/apache/tiles/config/defs3.xml");
TilesApplicationContext applicationContext = EasyMock
.createMock(TilesApplicationContext.class);
Set<URL> urlSet = new HashSet<URL>();
urlSet.add(url1);
EasyMock.expect(
applicationContext
.getResources("/WEB-INF/tiles.xml"))
.andReturn(urlSet);
EasyMock.replay(applicationContext);
Map<String, String> params = new HashMap<String, String>();
definitionDao.setApplicationContext(applicationContext);
definitionDao.init(params);
assertEquals("The reader is not of the correct class",
DigesterDefinitionsReader.class, definitionDao.reader
.getClass());
List<URL> sourceURLs = new ArrayList<URL>();
sourceURLs.add(url1);
assertEquals("The source URLs are not correct", sourceURLs,
definitionDao.sourceURLs);
EasyMock.reset(applicationContext);
applicationContext = EasyMock.createMock(TilesApplicationContext.class);
urlSet = new HashSet<URL>();
urlSet.add(url1);
EasyMock.expect(
applicationContext
.getResources("org/apache/tiles/config/defs1.xml"))
.andReturn(urlSet);
urlSet = new HashSet<URL>();
urlSet.add(url2);
EasyMock.expect(
applicationContext
.getResources("org/apache/tiles/config/defs2.xml"))
.andReturn(urlSet);
urlSet = new HashSet<URL>();
urlSet.add(url3);
EasyMock.expect(
applicationContext
.getResources("org/apache/tiles/config/defs3.xml"))
.andReturn(urlSet);
EasyMock.replay(applicationContext);
params.clear();
params.put(DefinitionsFactory.READER_IMPL_PROPERTY,