test_class.file: oak-authorization-cug/src/test/java/org/apache/jackrabbit/oak/spi/security/authorization/cug/impl/NestedCugHookTest.java
test_class.identifier: NestedCugHookTest
test_class.superclass: extends AbstractCugTest
test_case.body: @Test
      public void testHiddenChildNodeChanged() {
          NestedCugHook nch = new NestedCugHook();
  
          NodeState nodeState = getTreeProvider().asNodeState(root.getTree(PathUtils.ROOT_PATH));
          NodeState after = spy(nodeState);
          NodeState before = spy(nodeState);
  
          NodeState child = mock(NodeState.class);
          Iterable hidden = Collections.singleton(new MemoryChildNodeEntry(":hidden", child));
          Iterable cnes = Iterables.concat(hidden, nodeState.getChildNodeEntries());
          when(before.getChildNodeEntries()).thenReturn(cnes);
          when(before.getChildNode(":hidden")).thenReturn(child);
  
          NodeState child2 = when(mock(NodeState.class).exists()).thenReturn(true).getMock();
          hidden = Collections.singleton(new MemoryChildNodeEntry(":hidden", child2));
          cnes = Iterables.concat(hidden, nodeState.getChildNodeEntries());
          when(after.getChildNodeEntries()).thenReturn(cnes);
          when(after.getChildNode(":hidden")).thenReturn(child2);
  
          nch.processCommit(before, after, new CommitInfo("sid", null));
  
          verify(child, never()).getProperty(anyString());
          verify(child2, never()).getProperty(anyString());
      }
test_case.class_method_signature: NestedCugHookTest.testHiddenChildNodeChanged()
test_case.full_signature: @Test public void testHiddenChildNodeChanged()
test_case.identifier: testHiddenChildNodeChanged
test_case.invocations: asNodeState getTreeProvider getTree spy spy mock singleton concat getChildNodeEntries thenReturn when getChildNodeEntries thenReturn when getChildNode getMock thenReturn when exists mock singleton concat getChildNodeEntries thenReturn when getChildNodeEntries thenReturn when getChildNode processCommit getProperty verify never anyString getProperty verify never anyString
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testHiddenChildNodeChanged()
focal_class.declarator: log = LoggerFactory.getLogger(NestedCugHook.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(NestedCugHook.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: deletedCUGs = Sets.newHashSet()
focal_class.modifier: private
focal_class.original_string: private Set<String> deletedCUGs = Sets.newHashSet();
focal_class.type: Set<String>
focal_class.var_name: deletedCUGs
focal_class.declarator: moveSources = Sets.newHashSet()
focal_class.modifier: private
focal_class.original_string: private Set<String> moveSources = Sets.newHashSet();
focal_class.type: Set<String>
focal_class.var_name: moveSources
focal_class.file: oak-authorization-cug/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/cug/impl/NestedCugHook.java
focal_class.identifier: NestedCugHook
focal_class.interfaces: implements PostValidationHook, CugConstants
focal_class.class_method_signature: NestedCugHook.processCommit(NodeState before, NodeState after, CommitInfo info)
focal_class.full_signature: @NotNull @Override public NodeState processCommit(NodeState before, NodeState after, CommitInfo info)
focal_class.identifier: processCommit
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: (NodeState before, NodeState after, CommitInfo info)
focal_class.return: NodeState
focal_class.signature: NodeState processCommit(NodeState before, NodeState after, CommitInfo info)
focal_class.class_method_signature: NestedCugHook.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: NestedCugHook.addNestedCugPath(@NotNull NodeBuilder parentBuilder, @NotNull NodeBuilder builder, @NotNull String pathWithNewCug, boolean setCugCnt)
focal_class.full_signature: private void addNestedCugPath(@NotNull NodeBuilder parentBuilder, @NotNull NodeBuilder builder, @NotNull String pathWithNewCug, boolean setCugCnt)
focal_class.identifier: addNestedCugPath
focal_class.modifiers: private
focal_class.parameters: (@NotNull NodeBuilder parentBuilder, @NotNull NodeBuilder builder, @NotNull String pathWithNewCug, boolean setCugCnt)
focal_class.return: void
focal_class.signature: void addNestedCugPath(@NotNull NodeBuilder parentBuilder, @NotNull NodeBuilder builder, @NotNull String pathWithNewCug, boolean setCugCnt)
focal_class.class_method_signature: NestedCugHook.isDeletedOrMoved(@NotNull String path)
focal_class.full_signature: private boolean isDeletedOrMoved(@NotNull String path)
focal_class.identifier: isDeletedOrMoved
focal_class.modifiers: private
focal_class.parameters: (@NotNull String path)
focal_class.return: boolean
focal_class.signature: boolean isDeletedOrMoved(@NotNull String path)
focal_class.class_method_signature: NestedCugHook.removeNestedCugPath(@NotNull NodeBuilder parentBuilder, @NotNull String toRemove,
                                          @NotNull Iterable<String> toReconnect, boolean setCugCnt)
focal_class.full_signature: private static boolean removeNestedCugPath(@NotNull NodeBuilder parentBuilder, @NotNull String toRemove,
                                          @NotNull Iterable<String> toReconnect, boolean setCugCnt)
focal_class.identifier: removeNestedCugPath
focal_class.modifiers: private static
focal_class.parameters: (@NotNull NodeBuilder parentBuilder, @NotNull String toRemove,
                                          @NotNull Iterable<String> toReconnect, boolean setCugCnt)
focal_class.return: boolean
focal_class.signature: boolean removeNestedCugPath(@NotNull NodeBuilder parentBuilder, @NotNull String toRemove,
                                          @NotNull Iterable<String> toReconnect, boolean setCugCnt)
focal_class.class_method_signature: NestedCugHook.getHiddenPropertyBuilder(@Nullable PropertyState ps)
focal_class.full_signature: private static PropertyBuilder<String> getHiddenPropertyBuilder(@Nullable PropertyState ps)
focal_class.identifier: getHiddenPropertyBuilder
focal_class.modifiers: private static
focal_class.parameters: (@Nullable PropertyState ps)
focal_class.return: PropertyBuilder<String>
focal_class.signature: PropertyBuilder<String> getHiddenPropertyBuilder(@Nullable PropertyState ps)
focal_method.body: @NotNull
      @Override
      public NodeState processCommit(NodeState before, NodeState after, CommitInfo info) {
          NodeBuilder builder = after.builder();
          after.compareAgainstBaseState(before, new Diff(before, builder));
          deletedCUGs.clear();
          moveSources.clear();
          return builder.getNodeState();
      }
focal_method.class_method_signature: NestedCugHook.processCommit(NodeState before, NodeState after, CommitInfo info)
focal_method.full_signature: @NotNull @Override public NodeState processCommit(NodeState before, NodeState after, CommitInfo info)
focal_method.identifier: processCommit
focal_method.invocations: builder compareAgainstBaseState clear clear getNodeState
focal_method.modifiers: @NotNull @Override public
focal_method.parameters: (NodeState before, NodeState after, CommitInfo info)
focal_method.return: NodeState
focal_method.signature: NodeState processCommit(NodeState before, NodeState after, CommitInfo info)