	@Test
	public void testInc() {

		long key = 611;
		int n = 1<<10;
		int size = 1<<5;
		SpaceSaving ss = new SpaceSaving(n, size, 10);
		// increment same key size-1 times and make sure there are no overflows.
		for (int i=0; i < size - 1;++i) {
			System.out.println(i);
			assertEquals(ss.bound(key), i);
			assertFalse(ss.inc(key));
		}
		// increment once more and assert that there is an overflow.
		assertTrue(ss.inc(key));
		assertEquals(ss.bound(key), size);
	}