@Test
public void testSaveWithCreateRoot() throws Exception {

  CoreElement root = createCoreElement(null, Action.CREATE, null, null, "root", null);
  SessionContext context = TestUtils.createSessionContext(USER, "test");
  ElementContext elementContext = new ElementContext(new Id(), new Id());
  CoreElement returnedRoot =
      elementManager.save(context, elementContext, root, "save create root!");
  Assert.assertEquals(returnedRoot.getParentId(), null);
  Assert.assertEquals(returnedRoot.getNamespace(), Namespace.ROOT_NAMESPACE);
  verify(traverserMock)
      .traverse(context, elementContext, Space.PRIVATE, root, collaborativeStoreVisitorMock);
  verify(traverserMock).traverse(context, elementContext, Space.PRIVATE, root,
      indexingVisitorMock);
}