public static Collection<Integer> compareTrees(MerkleTreeView local, MerkleTreeView remote) {
        Collection<Integer> deltaOrders = new LinkedList<>();
        MerkleTreeView baseTree = local.depth() <= remote.depth() ? local : remote;
        MerkleTreeView otherTree = local.depth() <= remote.depth() ? remote : local;
        int leafLevel = baseTree.depth() - 1;
        int numberOfLeaves = getNodesOnLevel(leafLevel);
        int leftMostLeaf = getLeftMostNodeOrderOnLevel(leafLevel);

        for (int leafOrder = leftMostLeaf; leafOrder < leftMostLeaf + numberOfLeaves; leafOrder++) {
            if (baseTree.getNodeHash(leafOrder) != otherTree.getNodeHash(leafOrder)) {
                deltaOrders.add(leafOrder);
            }
        }

        return deltaOrders;
    }
@Test
    public void testCompareIdenticalTrees() {
        int[] tree = new int[4];
        for (int i = 0; i < 4; i++) {
            tree[i] = 4 - i;
        }
        MerkleTreeView localTree = new RemoteMerkleTreeView(tree, 3);
        MerkleTreeView remoteTree = new RemoteMerkleTreeView(tree, 3);

        Collection<Integer> deltaOrders = MerkleTreeUtil.compareTrees(localTree, remoteTree);
        assertTrue(deltaOrders.isEmpty());
    }