beanDefinitionContext = createApplicationContext("context");
Map<String, XpathMappingDataDictionary> dictionaries = beanDefinitionContext.getBeansOfType(XpathMappingDataDictionary.class);
Assert.assertEquals(dictionaries.size(), 3L);
XpathMappingDataDictionary dictionary = dictionaries.get("dataDictionary1");
Assert.assertEquals(dictionary.getName(), "dataDictionary1");
Assert.assertTrue(dictionary.isGlobalScope());
Assert.assertEquals(dictionary.getPathMappingStrategy(), DataDictionary.PathMappingStrategy.EXACT_MATCH);
Assert.assertNull(dictionary.getMappingFile());
Assert.assertEquals(dictionary.getMappings().size(), 3L);
Assert.assertEquals(dictionary.getMappings().get("//root/element/1"), "value1");
Assert.assertEquals(dictionary.getMappings().get("//root/element/2"), "value2");
Assert.assertEquals(dictionary.getMappings().get("//root/element/3"), "value3");
dictionary = dictionaries.get("dataDictionary2");
Assert.assertEquals(dictionary.getName(), "dataDictionary2");
Assert.assertFalse(dictionary.isGlobalScope());
Assert.assertEquals(dictionary.getPathMappingStrategy(), DataDictionary.PathMappingStrategy.STARTS_WITH);
Assert.assertNull(dictionary.getMappingFile());
Assert.assertEquals(dictionary.getMappings().size(), 1L);
Assert.assertEquals(dictionary.getMappings().get("//root/element/1"), "value1");
dictionary = dictionaries.get("dataDictionary3");
Assert.assertEquals(dictionary.getName(), "dataDictionary3");
Assert.assertTrue(dictionary.isGlobalScope());
Assert.assertEquals(dictionary.getPathMappingStrategy(), DataDictionary.PathMappingStrategy.EXACT_MATCH);
Assert.assertNotNull(dictionary.getMappingFile());
Assert.assertEquals(dictionary.getMappings().size(), 2L);
Assert.assertEquals(dictionary.getMappings().get("//root/element/1"), "value1");
Assert.assertEquals(dictionary.getMappings().get("//root/element/2"), "value2");
}