### Question:
RepositoryNodeTypeManager implements JcrSystemObserver { JcrNodeDefinition findChildNodeDefinition( Name primaryTypeNameOfParent, List<Name> mixinTypeNamesOfParent, Name childName, Name childPrimaryNodeType, int numberOfExistingChildrenWithSameName, boolean skipProtected ) { JcrNodeType childType = childPrimaryNodeType != null ? getNodeType(childPrimaryNodeType) : null; boolean requireSns = numberOfExistingChildrenWithSameName > 1; JcrNodeType primaryType = getNodeType(primaryTypeNameOfParent); if (primaryType != null) { for (JcrNodeDefinition definition : primaryType.allChildNodeDefinitions(childName, requireSns)) { if (skipProtected && definition.isProtected()) return null; if (definition.allowsChildWithType(childType)) return definition; } } if (mixinTypeNamesOfParent != null && !mixinTypeNamesOfParent.isEmpty()) { for (Name mixinTypeName : mixinTypeNamesOfParent) { JcrNodeType mixinType = getNodeType(mixinTypeName); if (mixinType == null) continue; for (JcrNodeDefinition definition : mixinType.allChildNodeDefinitions(childName, requireSns)) { if (skipProtected && definition.isProtected()) return null; if (definition.allowsChildWithType(childType)) return definition; } } } if (!childName.equals(JcrNodeType.RESIDUAL_NAME)) return findChildNodeDefinition(primaryTypeNameOfParent, mixinTypeNamesOfParent, JcrNodeType.RESIDUAL_NAME, childPrimaryNodeType, numberOfExistingChildrenWithSameName, skipProtected); return null; } RepositoryNodeTypeManager( JcrRepository repository,
                               Path nodeTypesPath,
                               boolean includeColumnsForInheritedProperties,
                               boolean includePseudoColumnsInSelectStar ); Collection<JcrNodeType> getAllNodeTypes(); Collection<JcrNodeType> getMixinNodeTypes(); Collection<JcrNodeType> getPrimaryNodeTypes(); JcrPropertyDefinition getPropertyDefinition( PropertyDefinitionId id ); JcrNodeDefinition getChildNodeDefinition( NodeDefinitionId id ); @Override Path getObservedPath(); @Override void notify( Changes changes );  }### Answer:
@Test public void shouldAllowMultipleSiblingsDefinitionIfOneSibling() throws Exception { NamespaceRegistry registry = context.getNamespaceRegistry(); JcrNodeDefinition def = repoTypeManager.findChildNodeDefinition(JcrNtLexicon.NODE_TYPE, Collections.<Name>emptyList(), JcrLexicon.PROPERTY_DEFINITION, JcrNtLexicon.PROPERTY_DEFINITION, 1, false); assertThat(def, is(notNullValue())); assertEquals(def.getName(), JcrLexicon.PROPERTY_DEFINITION.getString(registry)); }