getLog().debug(entry.getKey() + " = " + entry.getValue());
}
ManagedProperty prop = properties.get("activeBindingSetName");
assertNotNull("Missing property activeBindingSetName", prop);
MetaValue val = prop.getValue();
assertNotNull("property activeBindingSetName has no value", val);
assertTrue("property activeBindingSetName value is SimpleValue", val instanceof SimpleValue);
assertEquals("incorrect activeBindingSetName value", "ports-default", ((SimpleValue) val).getValue());
prop = properties.get("standardBindings");
assertNotNull("Missing property standardBindings", prop);
val = prop.getValue();
assertNotNull("property standardBindings has no value", val);
assertTrue("property standardBindings value is CollectionValue", val instanceof CollectionValue);
MetaValue[] elements = ((CollectionValue) val).getElements();
assertNotNull(elements);
for (MetaValue mv : elements)
{
getLog().info(mv);
serviceBindingMetadataTest(mv);
}
prop = properties.get("bindingSets");
assertNotNull("Missing property bindingSets", prop);
val = prop.getValue();
assertNotNull("property bindingSets has no value", val);
assertTrue("property bindingSets value is CollectionValue", val instanceof CollectionValue);
elements = ((CollectionValue) val).getElements();
assertNotNull("property bindingSets value has elements", elements);
Map<String, Integer> offsets = new HashMap<String, Integer>();
for (MetaValue mv : elements)
{
getLog().info(mv);
serviceBindingSetTest(mv, offsets);
}
assertEquals(Integer.valueOf(0), offsets.get("ports-default"));
assertEquals(Integer.valueOf(100), offsets.get("ports-01"));
assertEquals(Integer.valueOf(200), offsets.get("ports-02"));
assertEquals(Integer.valueOf(300), offsets.get("ports-03"));
prop = properties.get("serviceBindings");
assertNotNull("Missing property serviceBindings", prop);
log.info("serviceBindings: " + prop);
val = prop.getValue();
assertNotNull("property serviceBindings has no value", val);
assertTrue("property serviceBindings value is CompositeValue", val instanceof CompositeValue);
CompositeValue compVal = (CompositeValue) val;
assertEquals("correct number of sets of actual bindings", offsets.size(), compVal.values().size());
for (String bindingSetName : offsets.keySet())
{
MetaValue mv = compVal.get(bindingSetName);
assertTrue(mv instanceof CollectionValue);
CollectionValue colVal = (CollectionValue) mv;
getLog().info(colVal.getElements());
for (MetaValue element : colVal.getElements())
{