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());
assertEquals(2, config.getMappingById("grandchild").getPathValidators().size());
assertEquals("validator1", config.getMappingById("grandchild").getPathValidators().get(0).getValidatorIds());
assertEquals("validator2", config.getMappingById("grandchild").getPathValidators().get(1).getValidatorIds());
assertEquals(0, config.getMappingById("grandchild").getPathValidators().get(0).getIndex());
assertEquals(1, config.getMappingById("grandchild").getPathValidators().get(1).getIndex());
// actions
assertEquals(2, config.getMappingById("grandchild").getActions().size());
assertEquals("#{myBean.parentAction}", config.getMappingById("grandchild").getActions().get(0).getAction().getELExpression());
assertEquals("#{myBean.grandchildAction}", config.getMappingById("grandchild").getActions().get(1).getAction().getELExpression());
assertEquals(2, config.getMappingById("child").getActions().size());
assertEquals("#{myBean.parentAction}", config.getMappingById("child").getActions().get(0).getAction().getELExpression());
assertEquals("#{myBean.childAction}", config.getMappingById("child").getActions().get(1).getAction().getELExpression());
assertEquals(2, config.getMappingById("child2").getActions().size());
assertEquals("#{myBean.parentAction}", config.getMappingById("child2").getActions().get(0).getAction().getELExpression());
assertEquals("#{myBean.child2Action}", config.getMappingById("child2").getActions().get(1).getAction().getELExpression());
assertEquals(1, config.getMappingById("parent").getActions().size());
assertEquals("#{myBean.parentAction}", config.getMappingById("parent").getActions().get(0).getAction().getELExpression());
// query parameters
assertEquals(3, config.getMappingById("grandchild").getQueryParams().size());
assertEquals("parent", config.getMappingById("grandchild").getQueryParams().get(0).getName());
assertEquals("child", config.getMappingById("grandchild").getQueryParams().get(1).getName());
assertEquals("grandchild", config.getMappingById("grandchild").getQueryParams().get(2).getName());
assertEquals(2, config.getMappingById("child").getQueryParams().size());
assertEquals("parent", config.getMappingById("child").getQueryParams().get(0).getName());
assertEquals("child", config.getMappingById("child").getQueryParams().get(1).getName());
assertEquals(2, config.getMappingById("child2").getQueryParams().size());
assertEquals("parent", config.getMappingById("child2").getQueryParams().get(0).getName());
assertEquals("child2", config.getMappingById("child2").getQueryParams().get(1).getName());
assertEquals(1, config.getMappingById("parent").getQueryParams().size());
assertEquals("parent", config.getMappingById("parent").getQueryParams().get(0).getName());
}