test_class.declarator: ctx = mock(ProviderCtx.class)
test_class.modifier: private
test_class.original_string: private ProviderCtx ctx = mock(ProviderCtx.class);
test_class.type: ProviderCtx
test_class.var_name: ctx
test_class.declarator: vpHook
test_class.modifier: private
test_class.original_string: private VersionablePathHook vpHook;
test_class.type: VersionablePathHook
test_class.var_name: vpHook
test_class.declarator: t
test_class.modifier: private
test_class.original_string: private Tree t;
test_class.type: Tree
test_class.var_name: t
test_class.file: oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/permission/VersionablePathHookTest.java
test_class.identifier: VersionablePathHookTest
test_class.superclass: extends AbstractSecurityTest
test_case.body: @Test
      public void testInvalidVersionHistoryIsIgnored() throws Exception {
          NodeState after = new AbstractNodeState() {
              @Override
              public boolean exists() {
                  return true;
              }
  
              @Override
              public @NotNull Iterable<? extends PropertyState> getProperties() {
                  return ImmutableList.of(PropertyStates.createProperty(JCR_VERSIONHISTORY, "someValue"));
              }
  
              @Override
              public boolean hasChildNode(@NotNull String name) {
                  return true;
              }
  
              @Override
              public @NotNull NodeState getChildNode(@NotNull String name) throws IllegalArgumentException {
                  return this;
              }
  
              @Override
              public @NotNull Iterable<? extends ChildNodeEntry> getChildNodeEntries() {
                  return Collections.emptyList();
              }
  
              @Override
              public @NotNull NodeBuilder builder() {
                  return new MemoryNodeBuilder(this);
              }
          };
  
          NodeState spyAfter = spy(after);
          NodeState before = getTreeProvider().asNodeState(t);
  
          vpHook.processCommit(before, spyAfter, new CommitInfo("sid", null));
  
          // never enters ReadOnlyVersionManager.getOrCreateVersionHistory that first looks up uuid
          verify(spyAfter, never()).getProperty(JCR_UUID);
      }
test_case.class_method_signature: VersionablePathHookTest.testInvalidVersionHistoryIsIgnored()
test_case.full_signature: @Test public void testInvalidVersionHistoryIsIgnored()
test_case.identifier: testInvalidVersionHistoryIsIgnored
test_case.invocations: of createProperty emptyList spy asNodeState getTreeProvider processCommit getProperty verify never
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testInvalidVersionHistoryIsIgnored()
focal_class.declarator: workspaceName
focal_class.modifier: private final
focal_class.original_string: private final String workspaceName;
focal_class.type: String
focal_class.var_name: workspaceName
focal_class.declarator: providerCtx
focal_class.modifier: private final
focal_class.original_string: private final ProviderCtx providerCtx;
focal_class.type: ProviderCtx
focal_class.var_name: providerCtx
focal_class.file: oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/VersionablePathHook.java
focal_class.identifier: VersionablePathHook
focal_class.interfaces: implements CommitHook
focal_class.class_method_signature: VersionablePathHook.VersionablePathHook(@NotNull String workspaceName, @NotNull ProviderCtx providerCtx)
focal_class.full_signature: public  VersionablePathHook(@NotNull String workspaceName, @NotNull ProviderCtx providerCtx)
focal_class.identifier: VersionablePathHook
focal_class.modifiers: public
focal_class.parameters: (@NotNull String workspaceName, @NotNull ProviderCtx providerCtx)
focal_class.signature:  VersionablePathHook(@NotNull String workspaceName, @NotNull ProviderCtx providerCtx)
focal_class.class_method_signature: VersionablePathHook.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: VersionablePathHook.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_method.body: @NotNull
      @Override
      public NodeState processCommit(
              NodeState before, NodeState after, CommitInfo info)
              throws CommitFailedException {
          NodeBuilder rootBuilder = after.builder();
          NodeBuilder vsRoot = rootBuilder.child(NodeTypeConstants.JCR_SYSTEM).child(NodeTypeConstants.JCR_VERSIONSTORAGE);
  
          ReadWriteVersionManager vMgr = new ReadWriteVersionManager(vsRoot, rootBuilder);
          ReadOnlyNodeTypeManager ntMgr = ReadOnlyNodeTypeManager.getInstance(providerCtx.getRootProvider().createReadOnlyRoot(rootBuilder.getNodeState()), NamePathMapper.DEFAULT);
  
          after.compareAgainstBaseState(before, new Diff(vMgr, ntMgr, new Node(rootBuilder)));
          return rootBuilder.getNodeState();
      }
focal_method.class_method_signature: VersionablePathHook.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 child child getInstance createReadOnlyRoot getRootProvider getNodeState compareAgainstBaseState 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)