public void testGetUnseenCount() {
   assertEquals(0, fd.getCount("a"));
   fd.inc("b", 2);
   assertEquals(0, fd.getCount("a"));
   fd.inc("b");
   assertEquals(0, fd.getCount("a"));
 }
 public void testGetUnseenFreq() {
   assertEquals(0.0, fd.getFreq("a"));
   fd.inc("b", 2);
   assertEquals(0.0, fd.getFreq("a"));
   fd.inc("b");
   assertEquals(0.0, fd.getFreq("a"));
 }
 public void testSize() {
   fd.inc("a");
   assertEquals(1, fd.size());
   fd.inc("a", 3);
   assertEquals(1, fd.size());
   fd.inc("b", 2);
   assertEquals(2, fd.size());
 }
 public void testTotal() {
   fd.inc("a");
   assertEquals(1, fd.getTotal());
   fd.inc("a", 3);
   assertEquals(4, fd.getTotal());
   fd.inc("b", 2);
   assertEquals(6, fd.getTotal());
 }
 public void testFreq() {
   fd.inc("a", 1);
   assertEquals(1.0, fd.getFreq("a"));
   fd.inc("b", 1);
   assertEquals(0.5, fd.getFreq("a"));
   assertEquals(0.5, fd.getFreq("b"));
   fd.inc("a", 1);
   assertEquals(2.0 / 3L, fd.getFreq("a"), 0.001);
   assertEquals(1.0 / 3L, fd.getFreq("b"), 0.001);
 }
 public void testIncAmount() {
   fd.inc("a", 2);
   assertEquals(2, fd.getCount("a"));
   fd.inc("a", 3);
   assertEquals(5, fd.getCount("a"));
 }
 public void testInc() {
   fd.inc("a");
   assertEquals(1, fd.getCount("a"));
   fd.inc("a");
   assertEquals(2, fd.getCount("a"));
 }