### Question:
IntObjectHashtable implements Serializable { public IntObjectHashtable() { this(3); } IntObjectHashtable(); @SuppressWarnings("unchecked")  IntObjectHashtable(int capacity); void put(int key, T value); T get(int key); boolean remove(int key); @SuppressWarnings("unchecked") void removeAll(); boolean contains(int key); int size(); int[] getKeys();  }### Answer:
@Test public void testIntObjectHashtable() { IntObjectHashtable<String> ht = new IntObjectHashtable<String>(); System.out.println("Test put method"); ht.put(10000, "bill"); ht.put(20000, "john"); ht.put(30000, "fred"); ht.put(40000, "tom"); test(ht, 10000, "bill"); test(ht, 20000, "john"); test(ht, 30000, "fred"); test(ht, 40000, "tom"); test(ht, 50000, null); System.out.println("Test contains method"); testContains(ht, new int[]{10000,20000,30000,40000}, "Add"); System.out.println("Test size method"); if (ht.size() != 4) { Assert.fail("size should be 4, but it is "+ht.size()); } System.out.println("Test remove"); ht.remove(20000); if (ht.size() != 3) { Assert.fail("size should be 3, but it is "+ht.size()); } testContains(ht, new int[]{10000,30000,40000}, "Remove"); System.out.println("Test removeAll"); ht.removeAll(); if (ht.size() != 0) { Assert.fail("size should be 0, but it is "+ht.size()); } testContains(ht,new int[]{}, "RemoveAll"); System.out.println("Test grow by adding 500 values"); for(int i=0;i<500;i++) { ht.put(i*100, "LAB"+i); } for(int i= 0;i<50000;i++) { if (ht.contains(i)) { if (i%100 != 0) { Assert.fail("hashtable contains key "+i+", but it shouldn't"); } } else { if (i%100 == 0) { Assert.fail("hashtable should contain key "+i+", but it doesn't"); } } } }