@Test
public void testResolveDefinition() {

    Definition def = new Definition();
    def.setName("testDef(.*)\\.message(.*)");
    def.setTemplateAttribute(Attribute.createTemplateAttribute("/test{1}.jsp"));
    def.putAttribute("body", new Attribute("message{2}"));
    DefinitionPatternMatcher patternMatcher = new RegexpDefinitionPatternMatcher("testDef(.*)\\.message(.*)", def);
    Definition result = patternMatcher.createDefinition("testDefOne.messageTwo");
    assertNotNull(result);
    assertEquals("testDefOne.messageTwo", result.getName());
    assertEquals("/testOne.jsp", result.getTemplateAttribute().getValue());
    assertEquals("messageTwo", result.getAttribute("body").getValue());
}