@Test
    public void requireThatPositiveNumberCompressCorrectly() {
        byte [] zero = {0};
        verifyPositiveNumber(0, zero);
        byte [] one = {0x01};
        verifyPositiveNumber(1, one);
        byte [] x3f = {0x3f};
        verifyPositiveNumber(0x3f, x3f);
        byte [] x40 = {(byte)0x80,0x40};
        verifyPositiveNumber(0x40, x40);
        byte [] x3fff = {(byte)0xbf, (byte)0xff};
        verifyPositiveNumber(0x3fff, x3fff);
        byte [] x4000 = {(byte)0xc0, 0x00, 0x40, 0x00};
        verifyPositiveNumber(0x4000, x4000);
        byte [] x3fffffff = {(byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff};
        verifyPositiveNumber(0x3fffffff, x3fffffff);
        byte [] x40000000 = {0,0,0,0};
        assertEquals("Number '1073741824' too big, must extend encoding",
                     assertThrows(IllegalArgumentException.class, () -> verifyPositiveNumber(0x40000000, x40000000)).getMessage());
        assertEquals("Number '-1' must be positive",
                     assertThrows(IllegalArgumentException.class, () -> verifyPositiveNumber(-1, x40000000)).getMessage());
    }
Test that integers compresses correctly.

@author baldersheim
vespajlib/src/test/java/com/yahoo/compress/IntegerCompressorTest.java