@Test
    public void testDecoding_slow() {
        int x = 0;
        int y = 0;
        long z = ZCurve.encode_slow(x, y);
        int[] xy = ZCurve.decode_slow(z);
        assertEquals(xy[0], x);
        assertEquals(xy[1], y);

        x = Integer.MAX_VALUE;
        y = Integer.MAX_VALUE;
        z = ZCurve.encode_slow(x, y);
        xy = ZCurve.decode_slow(z);
        assertEquals(xy[0], x);
        assertEquals(xy[1], y);

        x = Integer.MIN_VALUE;
        y = Integer.MIN_VALUE;
        z = ZCurve.encode_slow(x, y);
        xy = ZCurve.decode_slow(z);
        assertEquals(xy[0], x);
        assertEquals(xy[1], y);

        x = Integer.MIN_VALUE;
        y = Integer.MAX_VALUE;
        z = ZCurve.encode_slow(x, y);
        xy = ZCurve.decode_slow(z);
        assertEquals(xy[0], x);
        assertEquals(xy[1], y);

        x = -18;
        y = 1333;
        z = ZCurve.encode_slow(x, y);
        xy = ZCurve.decode_slow(z);
        assertEquals(xy[0], x);
        assertEquals(xy[1], y);

        x = -1333;
        y = 18;
        z = ZCurve.encode_slow(x, y);
        xy = ZCurve.decode_slow(z);
        assertEquals(xy[0], x);
        assertEquals(xy[1], y);
    }
Verify that decoded values are equal to inputs in different cases
vespajlib/src/test/java/com/yahoo/geo/ZCurveTestCase.java