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 WildcardDefinitionPatternMatcher(
"testDef*.message*", def, new WildcardHelper());
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());
}