### Question:
SimpleHashtable implements Iterable<TableEntry<K, V>> { public boolean containsKey(Object key) { if (key == null) { return false; } if (slotIsEmpty(key)) { return false; } return findKey(key).key.equals(key); } SimpleHashtable(); @SuppressWarnings("unchecked")  SimpleHashtable(int capacity); void put(K key, V value); V get(Object key); int size(); boolean containsKey(Object key); boolean containsValue(Object value); void remove(Object key); boolean isEmpty(); @Override String toString(); void clear(); int getCapacity(); @Override Iterator<TableEntry<K, V>> iterator(); static final int MINIMUM_CAPACITY; static final int DEFAULT_CAPACITY; }### Answer:
@Test void testContainsKeyWithExistingKeys() { var table = createHashTableWithNElements(5); for (int index = 0; index < 5; index++) { assertTrue(table.containsKey("" + index)); } }
@Test void testContainsKeyWithNonExistingKeys() { var table = createHashTableWithNElements(5); for (int index = 0; index < 5; index++) { assertFalse(table.containsKey("" + (index + 10))); } }
@Test void testContainsKeyWithNull() { var table = createHashTableWithNElements(5); assertFalse(table.containsKey(null)); }