### Question:
CompactMap implements Map { @Override public MapKey withKey() { currentEntryOffset = currentEntryOffset + currentEntrySize; entries.jumpTo(currentEntryOffset + columnOffsets[valueColumnCount]); currentEntrySize = entryFixedSize; return key; } CompactMap(int pageSize, ColumnTypes keyTypes, ColumnTypes valueTypes, long keyCapacity, double loadFactor, int maxResizes, int maxPages);   CompactMap(int pageSize, ColumnTypes keyTypes, ColumnTypes valueTypes, long keyCapacity, double loadFactor, HashFunction hashFunction, int maxResizes, int maxPages); @Override void clear(); @Override void close(); @Override RecordCursor getCursor(); @Override MapRecord getRecord(); @Override long size(); @Override MapValue valueAt(long address); @Override MapKey withKey(); long getKeyCapacity(); int getValueColumnCount(); static final byte BITS_DIRECT_HIT; static final byte BITS_DISTANCE; static final int jumpDistancesLen; }### Answer:
@Test public void testKeyLookup() { double loadFactor = 0.9; try (CompactMap map = new CompactMap( 1024 * 1024, new SingleColumnType(ColumnType.STRING), new SingleColumnType(ColumnType.LONG), 12, loadFactor, new MockHash(), 1, Integer.MAX_VALUE)) { MapKey key; MapValue value; key = map.withKey(); key.putStr("000-ABCDE"); value = key.createValue(); Assert.assertTrue(value.isNew()); value.putDouble(0, 12.5); key = map.withKey(); key.putStr("000-ABCDG"); value = key.createValue(); Assert.assertTrue(value.isNew()); value.putDouble(0, 11.5); key = map.withKey(); key.putStr("100-ABCDE"); value = key.createValue(); Assert.assertTrue(value.isNew()); value.putDouble(0, 10.5); key = map.withKey(); key.putStr("200-ABCDE"); Assert.assertNull(key.findValue()); key = map.withKey(); key.putStr("004-ABCDE"); Assert.assertNull(key.findValue()); key = map.withKey(); key.putStr("033-ABCDE"); Assert.assertNull(key.findValue()); } }