assertNotNull("Could not load defs2 file.", url2);
URL url3 = this.getClass().getClassLoader().getResource(
"org/apache/tiles/config/defs3.xml");
assertNotNull("Could not load defs3 file.", url3);
TilesApplicationContext applicationContext = EasyMock
.createMock(TilesApplicationContext.class);
Set<URL> 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);
factory.setApplicationContext(applicationContext);