ConfigurationInstanceDescriptorUtil.createConfigurationInstance(def, config);
assertEquals(instance.getConfigurationProperty().size(), 1,
"Unexpected number of properties in configuration instance.");
ListPropertyInstanceDescriptor listInstance =
(ListPropertyInstanceDescriptor) instance.getConfigurationProperty().get(0).getValue();
assertEquals(listInstance.getName(), "list", "Unexpected list instance name");
assertEquals(listInstance.getLongDescription(), "list descr", "Unexpected list instance description");
assertTrue(listInstance.isRequired(), "Unexpected list instance required flag");
MapProperty propDef = (MapProperty) listInstance.getConfigurationProperty().getValue();
assertEquals(propDef.getName(), "map", "Unexpected simple instance name");
assertEquals(propDef.getLongDescription(), "map descr", "Unexpected simple instance description");
assertTrue(propDef.isRequired(), "Unexpected simple instance required flag");
assertEquals(listInstance.getValues().getComplexValue().size(), 2, "Unexpected number of list values");
ComplexValueMapDescriptor map1 =
(ComplexValueMapDescriptor) listInstance.getValues().getComplexValue().get(0).getValue();
ComplexValueMapDescriptor map2 =
(ComplexValueMapDescriptor) listInstance.getValues().getComplexValue().get(1).getValue();
assertEquals(map1.getComplexValue().size(), 2, "Unexpected number of map elements in the first map value.");
assertEquals(map2.getComplexValue().size(), 2, "Unexpected number of map elements in the second map value.");
ComplexValueSimpleDescriptor value11 = (ComplexValueSimpleDescriptor) map1.getComplexValue().get(0).getValue();