### Question:
ShortStringHashtable implements Serializable { public ShortStringHashtable() { this((short)3); } ShortStringHashtable();  ShortStringHashtable(short capacity); void put(short key, String value); String get(short key); boolean remove(short key); void removeAll(); boolean contains(short key); int size(); short[] getKeys();  }### Answer:
@Test public void testShortStringHashtable() { ShortStringHashtable ht = new ShortStringHashtable(); System.out.println("Test put method"); ht.put((short)100, "bill"); ht.put((short)200, "john"); ht.put((short)300, "fred"); ht.put((short)400, "tom"); test(ht, (short)100, "bill"); test(ht, (short)200, "john"); test(ht, (short)300, "fred"); test(ht, (short)400, "tom"); test(ht, (short)500, null); System.out.println("Test contains method"); testContains(ht, new short[]{100,200,300,400}, "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((short)200); if (ht.size() != 3) { Assert.fail("size should be 3, but it is "+ht.size()); } testContains(ht, new short[]{100,300,400}, "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 short[]{}, "RemoveAll"); System.out.println("Test grow by adding 500 values"); for(int i=0;i<500;i++) { ht.put((short)(i*10), "LAB"+i); } for(int i= 0;i<5000;i++) { if (ht.contains((short)i)) { if (i%10 != 0) { Assert.fail("hashtable contains key "+i+", but it shouldn't"); } } else { if (i%10 == 0) { Assert.fail("hashtable should contain key "+i+", but it doesn't"); } } } }