    @Test
    public void testReadLong() throws Exception {

        // Zero
        ByteBuffer buffer = ByteBuffer.allocate(8);
        buffer.asLongBuffer().put(0);
        assertEquals(0, CodingUtil.readLong(buffer.array()));
        // Max value
        buffer.position(0);
        buffer.asLongBuffer().put(Long.MAX_VALUE);
        assertEquals(Long.MAX_VALUE, CodingUtil.readLong(buffer.array()));
        // Odd value
        buffer.position(0);
        buffer.asLongBuffer().put(46517);
        assertEquals(46517, CodingUtil.readLong(buffer.array()));
        // Min value
        buffer.position(0);
        buffer.asLongBuffer().put(Long.MIN_VALUE);
        assertEquals(Long.MIN_VALUE, CodingUtil.readLong(buffer.array()));
    }