@Override
    public void clear() {
        Arrays.fill(tree, 0);
    }
@Test
    public void testClear() {
        MerkleTree merkleTree = new ArrayMerkleTree(4);

        merkleTree.updateAdd(0x80000000, 1); // leaf 7
        merkleTree.updateAdd(0xA0000000, 2); // leaf 8
        merkleTree.updateAdd(0xC0000000, 3); // leaf 9
        merkleTree.updateAdd(0xE0000000, 4); // leaf 10
        merkleTree.updateAdd(0x00000000, 5); // leaf 11
        merkleTree.updateAdd(0x20000000, 6); // leaf 12
        merkleTree.updateAdd(0x40000000, 7); // leaf 13
        merkleTree.updateAdd(0x60000000, 8); // leaf 14

        assertNotEquals(0, merkleTree.getNodeHash(0));

        merkleTree.clear();

        for (int nodeOrder = 0; nodeOrder < MerkleTreeUtil.getNumberOfNodes(merkleTree.depth()); nodeOrder++) {
            assertEquals(0, merkleTree.getNodeHash(nodeOrder));
        }
    }