NodeBuilder leftBuilder = oldState.builder();
leftBuilder.setProperty("foo", "bar");
NodeState leftState = leftBuilder.getNodeState();
NodeStoreBranch leftBranch = left.branch();
leftBranch.setRoot(leftState);
leftBranch.merge(EmptyHook.INSTANCE, PostCommitHook.EMPTY);
assertEquals(oldState, root.getRoot());
assertEquals(leftState, left.getRoot());
assertEquals(oldState, right.getRoot());
store.getJournal("left").merge();
assertEquals(leftState, root.getRoot());
assertEquals(leftState, left.getRoot());
assertEquals(oldState, right.getRoot());
NodeBuilder rightBuilder = oldState.builder();
rightBuilder.setProperty("bar", "foo");
NodeState rightState = rightBuilder.getNodeState();
NodeStoreBranch rightBranch = right.branch();
rightBranch.setRoot(rightState);
rightBranch.merge(EmptyHook.INSTANCE, PostCommitHook.EMPTY);
store.getJournal("right").merge();
NodeState newState = root.getRoot();
assertEquals("bar", newState.getProperty("foo").getValue(Type.STRING));
assertEquals("foo", newState.getProperty("bar").getValue(Type.STRING));