@Test
public void testEquals() throws UnsupportedEncodingException {

    System.out.println("equals");
    BloomFilter instance1 = new BloomFilter(1000, 100);
    BloomFilter instance2 = new BloomFilter(1000, 100);
    for (int i = 0; i < 100; i++) {
        byte[] val = UUID.randomUUID().toString().getBytes("UTF-8");
        instance1.add(val);
        instance2.add(val);
    }
    assert(instance1.equals(instance2));
    assert(instance2.equals(instance1));
    byte[] anotherEntryByteArray = "Another Entry".getBytes("UTF-8");
    instance1.add(anotherEntryByteArray); // make instance1 and instance2 different before clearing
    instance1.clear();
    instance2.clear();
    assert(instance1.equals(instance2));
    assert(instance2.equals(instance1));
    for (int i = 0; i < 100; i++) {
        byte[] val = UUID.randomUUID().toString().getBytes("UTF-8");
        instance1.add(val);
        instance2.add(val);
    }
    assertTrue(instance1.equals(instance2));
    assertTrue(instance2.equals(instance1));
}