beanDefinitionContext = createApplicationContext("context");
Map<String, NodeMappingDataDictionary> dictionaries = beanDefinitionContext.getBeansOfType(NodeMappingDataDictionary.class);
Assert.assertEquals(dictionaries.size(), 3L);
NodeMappingDataDictionary 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("node.name.1"), "value1");
Assert.assertEquals(dictionary.getMappings().get("node.name.2"), "value2");
Assert.assertEquals(dictionary.getMappings().get("node.name.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("node.name.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("node.name.1"), "value1");
Assert.assertEquals(dictionary.getMappings().get("node.name.2"), "value2");
}