### Question:
AbstractManagedObjectDefinition { public final Collection<RelationDefinition<? super C, ? super S>> getAllReverseRelationDefinitions() { List<RelationDefinition<? super C, ? super S>> rdlist = new LinkedList<>(); if (parent != null) { rdlist.addAll(parent.getAllReverseRelationDefinitions()); } rdlist.addAll(reverseRelationDefinitions); return rdlist; } 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 testGetAllReverseRelationDefinitions() { Collection<RelationDefinition<? super TestParentCfgClient, ? super TestParentCfg>> parentRelDef = TestParentCfgDefn.getInstance().getAllReverseRelationDefinitions(); assertThat(parentRelDef).hasSize(2); assertThat(parentRelDef).contains(TestCfg.getTestOneToManyParentRelationDefinition()); assertThat(parentRelDef).contains(TestCfg.getTestOneToZeroOrOneParentRelationDefinition()); Collection<RelationDefinition<? super TestChildCfgClient, ? super TestChildCfg>> childRelDef = TestChildCfgDefn.getInstance().getAllReverseRelationDefinitions(); assertThat(childRelDef).hasSize(2); assertThat(childRelDef).contains(TestParentCfgDefn.getInstance().getTestChildrenRelationDefinition()); assertThat(childRelDef).contains(TestParentCfgDefn.getInstance().getOptionalTestChildRelationDefinition()); }