### Question:
GHLongIntBTree implements LongIntMap { @Override public int put(long key, int value) { if (key == noNumberValue) { throw new IllegalArgumentException("Illegal key " + key); } ReturnValue rv = root.put(key, value); if (rv.tree != null) { height++; root = rv.tree; } if (rv.oldValue == noNumberValue) { size++; if (size % 1000000 == 0) optimize(); } return rv.oldValue; } GHLongIntBTree(int maxLeafEntries); @Override int put(long key, int value); @Override int get(long key); @Override long getSize(); @Override int getMemoryUsage(); @Override void optimize(); @Override String toString();  }### Answer:
@Test public void testThrowException_IfPutting_NoNumber() { GHLongIntBTree instance = new GHLongIntBTree(2); try { instance.put(-1, 1); assertTrue(false); } catch (Exception ex) { } }
@Test public void testPut() { GHLongIntBTree instance = new GHLongIntBTree(3); instance.put(2, 4); instance.put(7, 14); instance.put(5, 10); instance.put(6, 12); instance.put(3, 6); instance.put(4, 8); instance.put(9, 18); instance.put(0, 0); instance.put(1, 2); instance.put(8, 16); check(instance, 0); instance.put(10, 20); instance.put(11, 22); assertEquals(12, instance.getSize()); assertEquals(3, instance.height()); assertEquals(12, instance.get(6)); check(instance, 0); }