private void tip() {
        estimator = builder.build();

        for (Object o : counter) {
            estimator.offer(o);
        }

        counter = null;
        builder = null;
        tipped = true;
    }
@Test
    public void testTip() throws IOException, ClassNotFoundException {
        CountThenEstimate cte = new CountThenEstimate(10000, new LinearCounting.Builder(1024));
        CountThenEstimate clone = new CountThenEstimate(cte.getBytes());
        assertCountThenEstimateEquals(cte, clone);

        for (int i = 0; i < 128; i++) {
            cte.offer(Integer.toString(i));
        }

        clone = new CountThenEstimate(cte.getBytes());
        assertEquals(128, cte.cardinality());
        assertCountThenEstimateEquals(cte, clone);

        for (int i = 128; i < 256; i++) {
            cte.offer(Integer.toString(i));
        }

        clone = new CountThenEstimate(cte.getBytes());
        assertFalse(cte.tipped());
        assertEquals(256, cte.cardinality());
        assertTrue(clone.tipped());
        double error = Math.abs(cte.cardinality() - 256) / 256D;
        assertEquals(0.1, error, 0.1);

    }