@Test
public void testCreatePatternDefinitionResolver() {

    PatternDefinitionResolver<Integer> resolver = factory.createPatternDefinitionResolver(Integer.class);
    assertTrue(resolver instanceof PrefixedPatternDefinitionResolver);
    Definition definitionWildcard = new Definition("WILDCARD:blah*", (Attribute) null, null);
    Definition definitionRegexp = new Definition("REGEXP:what(.*)", (Attribute) null, null);
    Map<String, Definition> definitionMap = new HashMap<String, Definition>();
    definitionMap.put("WILDCARD:blah*", definitionWildcard);
    definitionMap.put("REGEXP:what(.*)", definitionRegexp);
    resolver.storeDefinitionPatterns(definitionMap, 1);
    Definition result = resolver.resolveDefinition("blahX", 1);
    assertEquals("blahX", result.getName());
    result = resolver.resolveDefinition("whatX", 1);
    assertEquals("whatX", result.getName());
}