test_class.file: oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/privilege/PrivilegeUtilTest.java
test_class.identifier: PrivilegeUtilTest
test_case.body: @Test
      public void testReadDefinitionsWithAggregates() {
          Iterable<String> aggregateNames = ImmutableSet.of(JCR_READ);
          Tree defTree = when(mock(Tree.class).getProperty(REP_AGGREGATES)).thenReturn(PropertyStates.createProperty(REP_AGGREGATES, aggregateNames, Type.NAMES)).getMock();
          when(defTree.getName()).thenReturn("name");
  
  
          PrivilegeDefinition def = PrivilegeUtil.readDefinition(defTree);
          assertEquals("name", def.getName());
          assertTrue(Iterables.elementsEqual(aggregateNames, PrivilegeUtil.readDefinition(defTree).getDeclaredAggregateNames()));
  
      }
test_case.class_method_signature: PrivilegeUtilTest.testReadDefinitionsWithAggregates()
test_case.full_signature: @Test public void testReadDefinitionsWithAggregates()
test_case.identifier: testReadDefinitionsWithAggregates
test_case.invocations: of getMock thenReturn when getProperty mock createProperty thenReturn when getName readDefinition assertEquals getName assertTrue elementsEqual getDeclaredAggregateNames readDefinition
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testReadDefinitionsWithAggregates()
focal_class.file: oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/privilege/PrivilegeUtil.java
focal_class.identifier: PrivilegeUtil
focal_class.interfaces: implements PrivilegeConstants
focal_class.class_method_signature: PrivilegeUtil.PrivilegeUtil()
focal_class.full_signature: private  PrivilegeUtil()
focal_class.identifier: PrivilegeUtil
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  PrivilegeUtil()
focal_class.class_method_signature: PrivilegeUtil.getPrivilegesTree(Root root)
focal_class.full_signature: @NotNull public static Tree getPrivilegesTree(Root root)
focal_class.identifier: getPrivilegesTree
focal_class.modifiers: @NotNull public static
focal_class.parameters: (Root root)
focal_class.return: Tree
focal_class.signature: Tree getPrivilegesTree(Root root)
focal_class.class_method_signature: PrivilegeUtil.readDefinition(@NotNull Tree definitionTree)
focal_class.full_signature: @NotNull public static PrivilegeDefinition readDefinition(@NotNull Tree definitionTree)
focal_class.identifier: readDefinition
focal_class.modifiers: @NotNull public static
focal_class.parameters: (@NotNull Tree definitionTree)
focal_class.return: PrivilegeDefinition
focal_class.signature: PrivilegeDefinition readDefinition(@NotNull Tree definitionTree)
focal_method.body: @NotNull
      public static PrivilegeDefinition readDefinition(@NotNull Tree definitionTree) {
          String name = definitionTree.getName();
          boolean isAbstract = TreeUtil.getBoolean(definitionTree, REP_IS_ABSTRACT);
          Iterable<String> declAggrNames = null;
          PropertyState property = definitionTree.getProperty(REP_AGGREGATES);
          if (property != null) {
              declAggrNames = property.getValue(Type.NAMES);
          }
          return new ImmutablePrivilegeDefinition(name, isAbstract, declAggrNames);
      }
focal_method.class_method_signature: PrivilegeUtil.readDefinition(@NotNull Tree definitionTree)
focal_method.full_signature: @NotNull public static PrivilegeDefinition readDefinition(@NotNull Tree definitionTree)
focal_method.identifier: readDefinition
focal_method.invocations: getName getBoolean getProperty getValue
focal_method.modifiers: @NotNull public static
focal_method.parameters: (@NotNull Tree definitionTree)
focal_method.return: PrivilegeDefinition
focal_method.signature: PrivilegeDefinition readDefinition(@NotNull Tree definitionTree)