@Override
    public long put(long key, long value) {
        if (value > maxValue)
            throw new IllegalArgumentException("Value " + value + " exceeded max value: " + maxValue
                    + ". Increase bytesPerValue (" + bytesPerValue + ")");
        if (value == emptyValue)
            throw new IllegalArgumentException("Value cannot be the 'empty value' " + emptyValue);

        ReturnValue rv = root.put(key, value);
        if (rv.tree != null) {
            height++;
            root = rv.tree;
        }
        if (rv.oldValue == null) {
            // successfully inserted
            size++;
            if (size % 1000000 == 0)
                optimize();
        }
        return rv.oldValue == null ? emptyValue : toLong(rv.oldValue);
    }
@Test
    public void testThrowException_IfPutting_NoNumber() {
        GHLongLongBTree instance = new GHLongLongBTree(2, 4, -1);
        IllegalArgumentException ex = assertThrows(IllegalArgumentException.class, () -> instance.put(1, -1));
        assertTrue(ex.getMessage().contains("Value cannot be the 'empty value' -1"));
    }