### Question:
OSMIDMap implements LongIntMap { @Override public int get(long key) { long retIndex = binarySearch(keys, 0, getSize(), key); if (retIndex < 0) return noEntryValue; return values.getInt(retIndex * 4); } OSMIDMap(Directory dir);  OSMIDMap(Directory dir, int noNumber); void remove(); @Override int put(long key, int value); @Override int get(long key); @Override long getSize(); long getCapacity(); @Override int getMemoryUsage(); @Override void optimize();  }### Answer:
@Test public void testGet() { OSMIDMap map = new OSMIDMap(new RAMDirectory()); map.put(9, 0); map.put(10, -50); map.put(11, 2); map.put(12, 3); map.put(20, 6); map.put(21, 5); map.put(31, 2); assertEquals(7, map.getSize()); assertEquals(-1, map.get(8)); assertEquals(0, map.get(9)); assertEquals(-50, map.get(10)); assertEquals(2, map.get(11)); assertEquals(3, map.get(12)); assertEquals(-1, map.get(13)); assertEquals(-1, map.get(19)); assertEquals(6, map.get(20)); assertEquals(5, map.get(21)); assertEquals(2, map.get(31)); assertEquals(-1, map.get(32)); for (int i = 0; i < 50; i++) { map.put(i + 50, i + 7); } assertEquals(57, map.getSize()); }