MutableRoot implements Root, PermissionAware { @Override public void commit(@NotNull Map<String, Object> info) throws CommitFailedException { checkLive(); ContentSession session = getContentSession(); CommitInfo commitInfo = new CommitInfo( session.toString(), session.getAuthInfo().getUserID(), newInfoWithCommitContext(info)); store.merge(builder, getCommitHook(), commitInfo); secureBuilder.baseChanged(); modCount = 0; if (permissionProvider.hasValue()) { permissionProvider.get().refresh(); } moveTracker.clear(); } MutableRoot(NodeStore store,
                 CommitHook hook,
                 String workspaceName,
                 Subject subject,
                 SecurityProvider securityProvider,
                 QueryEngineSettings queryEngineSettings,
                 QueryIndexProvider indexProvider,
                 ContentSessionImpl session); @NotNull @Override ContentSession getContentSession(); @Override boolean move(String sourcePath, String destPath); @NotNull @Override MutableTree getTree(@NotNull String path); @Override void rebase(); @Override final void refresh(); @Override void commit(@NotNull Map<String, Object> info); @Override void commit(); @Override boolean hasPendingChanges(); @NotNull @Override QueryEngine getQueryEngine(); @Override @NotNull Blob createBlob(@NotNull InputStream inputStream); @Override Blob getBlob(@NotNull String reference); @NotNull @Override PermissionProvider getPermissionProvider();  }
@Test public void testCommit() throws Exception { MutableTree t = root.getTree(PathUtils.ROOT_PATH); NodeBuilder nb = t.getNodeBuilder(); assertTrue(nb instanceof SecureNodeBuilder); assertEquals(canReadRootTree(t), nb.exists()); root.commit(); assertEquals(canReadRootTree(t), nb.exists()); MutableTree t2 = root.getTree(PathUtils.ROOT_PATH); NodeBuilder nb2 = t.getNodeBuilder(); assertEquals(canReadRootTree(t2), nb.exists()); assertEquals(nb2.exists(), nb.exists()); }