@Override
    public void writeLong(final long v) throws IOException {
        ensureAvailable(LONG_SIZE_IN_BYTES);
        MEM.putLong(buffer, ARRAY_BYTE_BASE_OFFSET + pos, v);
        pos += LONG_SIZE_IN_BYTES;
    }
@Test
    public void testWriteLongForPositionVByteOrder() throws Exception {
        long expected = 100;
        out.writeLong(10, expected, LITTLE_ENDIAN);
        out.writeLong(18, expected, BIG_ENDIAN);
        long actual1 = Bits.readLong(out.buffer, 10, false);
        long actual2 = Bits.readLong(out.buffer, 18, true);

        assertEquals(expected, actual1);
        assertEquals(expected, actual2);
    }