Collection<PropertyException> causes = e.getCauses();
Assert.assertEquals(causes.size(), 1);
Throwable cause = causes.iterator().next();
if (cause instanceof IllegalPropertyValueStringException) {
IllegalPropertyValueStringException pe = (IllegalPropertyValueStringException) cause;
Assert.assertEquals(pe.getPropertyDefinition(), TestChildCfgDefn
.getInstance().getAggregationPropertyPropertyDefinition());
Assert.assertEquals(pe.getIllegalValueString(),
"cn=LDAP Connection Handler, cn=bad rdn, cn=config");
} else {
// Got an unexpected cause.
throw e;
}