NodeStateCopier { public static boolean copyNodeStore(@NotNull final NodeStore source, @NotNull final NodeStore target) throws CommitFailedException { return builder().copy(checkNotNull(source), checkNotNull(target)); } private  NodeStateCopier(Set<String> includePaths, Set<String> excludePaths, Set<String> fragmentPaths, Set<String> excludeFragments, Set<String> mergePaths); static Builder builder(); static boolean copyNodeStore(@NotNull final NodeStore source, @NotNull final NodeStore target); static boolean copyProperties(NodeState source, NodeBuilder target);  }
@Test public void shouldMergeIdenticalContent() throws CommitFailedException, IOException { final NodeStore source = createPrefilledNodeStore(); final NodeStore target = createPrefilledNodeStore(); final NodeState before = target.getRoot(); NodeStateCopier.copyNodeStore(source, target); final NodeState after = target.getRoot(); expectDifference().strict().verify(before, after); expectDifference().strict().verify(source.getRoot(), after); }