@Test
public void difference() {

    Partition partition1 = new Partition(42, 42);
    IndexElt expected = new IndexElt.IndexEltBuilder()
            .id(42L)
            .type(1)
            .partition(partition1)
            .offset(0L)
            .length(128L)
            .metadata(ImmutableMap.of("key", "value"))
            .crc(42L)
            .build();
    indexDao.add(expected);
    Partition partition2 = new Partition(42, 43);
    IndexElt expected2 = new IndexElt.IndexEltBuilder()
            .id(43L)
            .type(1)
            .partition(partition2)
            .offset(0L)
            .length(128L)
            .metadata(ImmutableMap.of("key", "value"))
            .crc(42L)
            .build();
    indexDao.add(expected2);
    MerkleTree merkleTree1 = indexUtils.buildMerkleTree(partition1);
    MerkleTree merkleTree2 = indexUtils.buildMerkleTree(partition2);
    assertEquals(MerkleTree.difference(merkleTree1, merkleTree2).get(0).getRange(), Range.openClosed(42L, 43L));
}