test_class.file: oak-auth-external/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/principal/ExternalIdentityRepositoryInitializerTest.java
test_class.identifier: ExternalIdentityRepositoryInitializerTest
test_class.superclass: extends AbstractExternalAuthTest
test_case.body: @Test
      public void testInitializeIndicesExist() {
          NodeBuilder builder = spy(getTreeProvider().asNodeState(root.getTree(PathUtils.ROOT_PATH)).builder());
  
          ExternalIdentityRepositoryInitializer initializer = new ExternalIdentityRepositoryInitializer(true);
          initializer.initialize(builder);
  
          verify(builder, never()).child("externalId");
          verify(builder, never()).child("externalPrincipalNames");
          verify(builder, never()).setProperty(anyString(), any());
      }
test_case.class_method_signature: ExternalIdentityRepositoryInitializerTest.testInitializeIndicesExist()
test_case.full_signature: @Test public void testInitializeIndicesExist()
test_case.identifier: testInitializeIndicesExist
test_case.invocations: spy builder asNodeState getTreeProvider getTree initialize child verify never child verify never setProperty verify never anyString any
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testInitializeIndicesExist()
focal_class.declarator: enforceUniqueIds
focal_class.modifier: private final
focal_class.original_string: private final boolean enforceUniqueIds;
focal_class.type: boolean
focal_class.var_name: enforceUniqueIds
focal_class.file: oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/principal/ExternalIdentityRepositoryInitializer.java
focal_class.identifier: ExternalIdentityRepositoryInitializer
focal_class.interfaces: implements RepositoryInitializer
focal_class.class_method_signature: ExternalIdentityRepositoryInitializer.ExternalIdentityRepositoryInitializer(boolean enforceUniqueIds)
focal_class.full_signature:   ExternalIdentityRepositoryInitializer(boolean enforceUniqueIds)
focal_class.identifier: ExternalIdentityRepositoryInitializer
focal_class.parameters: (boolean enforceUniqueIds)
focal_class.signature:  ExternalIdentityRepositoryInitializer(boolean enforceUniqueIds)
focal_class.class_method_signature: ExternalIdentityRepositoryInitializer.initialize(@NotNull NodeBuilder builder)
focal_class.full_signature: @Override public void initialize(@NotNull NodeBuilder builder)
focal_class.identifier: initialize
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull NodeBuilder builder)
focal_class.return: void
focal_class.signature: void initialize(@NotNull NodeBuilder builder)
focal_method.body: @Override
      public void initialize(@NotNull NodeBuilder builder) {
  
          // create index definition for "rep:externalId" and
          // "rep:externalPrincipalNames"
          NodeBuilder index = IndexUtils.getOrCreateOakIndex(builder);
          if (enforceUniqueIds && !index.hasChildNode("externalId")) {
              NodeBuilder definition = IndexUtils.createIndexDefinition(index, "externalId", true, true,
                      ImmutableList.of(ExternalIdentityConstants.REP_EXTERNAL_ID), null);
              definition.setProperty("info", "Oak index assuring uniqueness of rep:externalId properties.");
          }
          if (!index.hasChildNode("externalPrincipalNames")) {
              NodeBuilder definition = IndexUtils.createIndexDefinition(index, "externalPrincipalNames", true, false,
                      ImmutableList.of(ExternalIdentityConstants.REP_EXTERNAL_PRINCIPAL_NAMES), null);
              definition.setProperty("info",
                      "Oak index used by the principal management provided by the external authentication module.");
          }
      }
focal_method.class_method_signature: ExternalIdentityRepositoryInitializer.initialize(@NotNull NodeBuilder builder)
focal_method.full_signature: @Override public void initialize(@NotNull NodeBuilder builder)
focal_method.identifier: initialize
focal_method.invocations: getOrCreateOakIndex hasChildNode createIndexDefinition of setProperty hasChildNode createIndexDefinition of setProperty
focal_method.modifiers: @Override public
focal_method.parameters: (@NotNull NodeBuilder builder)
focal_method.return: void
focal_method.signature: void initialize(@NotNull NodeBuilder builder)