### Question:
AbstractManagedObjectDefinition { public final PropertyDefinition<?> getPropertyDefinition(String name) { if (name == null || name.length() == 0) { throw new IllegalArgumentException("null or empty property name"); } PropertyDefinition<?> d = allPropertyDefinitions.get(name); if (d == null) { throw new IllegalArgumentException("property definition \"" + name + "\" not found"); } return d; } protected  AbstractManagedObjectDefinition(String name,
        AbstractManagedObjectDefinition<? super C, ? super S> parent); final Collection<AbstractManagedObjectDefinition<? extends C, ? extends S>> getAllChildren(); final Collection<Constraint> getAllConstraints(); final Collection<PropertyDefinition<?>> getAllPropertyDefinitions(); final Collection<RelationDefinition<?, ?>> getAllRelationDefinitions(); final Collection<RelationDefinition<? super C, ? super S>> getAllReverseRelationDefinitions(); final Collection<AggregationPropertyDefinition<?, ?>> getAllAggregationPropertyDefinitions(); final Collection<AggregationPropertyDefinition<?, ?>> getAllReverseAggregationPropertyDefinitions(); final Collection<Tag> getAllTags(); final AbstractManagedObjectDefinition<? extends C, ? extends S> getChild(String name); final Collection<AbstractManagedObjectDefinition<? extends C, ? extends S>> getChildren(); final Collection<Constraint> getConstraints(); final LocalizableMessage getDescription(); final LocalizableMessage getDescription(Locale locale); final String getName(); final AbstractManagedObjectDefinition<? super C, ? super S> getParent(); final PropertyDefinition<?> getPropertyDefinition(String name); final Collection<PropertyDefinition<?>> getPropertyDefinitions(); final RelationDefinition<?, ?> getRelationDefinition(String name); final Collection<RelationDefinition<?, ?>> getRelationDefinitions(); final Collection<RelationDefinition<C, S>> getReverseRelationDefinitions(); final AggregationPropertyDefinition<?, ?> getAggregationPropertyDefinition(String name); final Collection<AggregationPropertyDefinition<?, ?>> getAggregationPropertyDefinitions(); final Collection<AggregationPropertyDefinition<?, ?>> getReverseAggregationPropertyDefinitions(); final LocalizableMessage getSynopsis(); final LocalizableMessage getSynopsis(Locale locale); final LocalizableMessage getUserFriendlyName(); final LocalizableMessage getUserFriendlyName(Locale locale); final LocalizableMessage getUserFriendlyPluralName(); final LocalizableMessage getUserFriendlyPluralName(Locale locale); final boolean hasChildren(); final boolean hasOption(ManagedObjectOption option); final boolean hasTag(Tag t); final boolean isChildOf(AbstractManagedObjectDefinition<?, ?> d); final boolean isParentOf(AbstractManagedObjectDefinition<?, ?> d); final boolean isTop(); final ManagedObjectDefinition<? extends C, ? extends S> resolveManagedObjectDefinition(DefinitionResolver r); @Override final String toString(); final void toString(StringBuilder builder);  }### Answer:
@Test public void testPropertyOverrideParent() { AbstractManagedObjectDefinition<?, ?> def = TestParentCfgDefn.getInstance(); PropertyDefinition<?> propertyDef = def.getPropertyDefinition("mandatory-class-property"); DefaultBehaviorProvider<?> provider = propertyDef.getDefaultBehaviorProvider(); assertEquals(provider.getClass(), DefinedDefaultBehaviorProvider.class); DefinedDefaultBehaviorProvider<?> definedProvider = (DefinedDefaultBehaviorProvider<?>) provider; assertEquals(definedProvider.getDefaultValues(), Collections.singleton("org.opends.server.extensions.SomeVirtualAttributeProvider")); }
@Test public void testPropertyOverrideChild() { AbstractManagedObjectDefinition<?, ?> def = TestChildCfgDefn.getInstance(); PropertyDefinition<?> propertyDef = def.getPropertyDefinition("mandatory-class-property"); DefaultBehaviorProvider<?> provider = propertyDef.getDefaultBehaviorProvider(); assertEquals(provider.getClass(), DefinedDefaultBehaviorProvider.class); DefinedDefaultBehaviorProvider<?> definedProvider = (DefinedDefaultBehaviorProvider<?>) provider; assertEquals(definedProvider.getDefaultValues(), Collections.singleton("org.opends.server.extensions.UserDefinedVirtualAttributeProvider")); }