@Test
public void testOffer() {

    System.out.println("offer");
    BJKST instance = new BJKST(1024, 64, 0.3);
    
    long cardinality = 500L;
    
    System.out.println("First batch:");
    for (long i = 0; i < cardinality; i++) {
        instance.offer(Long.valueOf(i));
        if (i % 50 == 0) {
            System.out.println("actual: " + i + ", estimated: " + instance.cardinality());
        }
    }
    
    System.out.println("Second batch:");
    for (long i = 0; i < cardinality; i++) {
        instance.offer(Long.valueOf(i));
        if (i % 50 == 0) {
            System.out.println("actual: " + i + ", estimated: " + instance.cardinality());
        }
    }
    System.out.println("actual: " + cardinality + ", estimated: " + instance.cardinality());
    
    assertEquals(cardinality, instance.cardinality(), 100);
}