WildcardDefinitionPatternMatcher implements
        DefinitionPatternMatcher { public Definition createDefinition(String definitionName) { List<String> vars = wildcardHelper.match(definitionName, pattern); Definition d = null; if (vars != null) { d = PatternUtil.replacePlaceholders(definition, definitionName, vars.toArray()); } return d; } WildcardDefinitionPatternMatcher(String pattern,
            Definition definition, WildcardHelper wildcardHelper); Definition createDefinition(String definitionName);  }
@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 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()); }