EasyMock.expect(servletContext.getInitParameter(ClassLoaderConfigurationProvider.CLASSPATH_CONFIG_ENABLED))
.andReturn("false").anyTimes();
EasyMock.expect(servletContext.getResourceAsStream(DefaultXMLConfigurationProvider.DEFAULT_PRETTY_FACES_CONFIG))
.andReturn(mockPrettyConfigInputStream()).anyTimes();
final PrettyConfigurator configurator = new PrettyConfigurator(servletContext);
EasyMock.replay(servletContext);
configurator.configure();
final PrettyConfig config = configurator.getConfig();
assertEquals(4, config.getMappings().size());
assertEquals("/parent", config.getMappingById("parent").getPattern());
assertEquals("/parent/child/#{name}", config.getMappingById("child").getPattern());
assertEquals("/parent/child/#{name}/grandchild/#{gname}", config.getMappingById("grandchild").getPattern());