@Override
    public final int skipBytes(final int n) {
        if (n <= 0) {
            return 0;
        }
        int skip = n;
        final int pos = position();
        if (pos + skip > size) {
            skip = size - pos;
        }
        position(pos + skip);
        return skip;
    }
@Test
    public void testSkipBytes() {
        int s1 = in.skipBytes(-1);
        int s2 = in.skipBytes(1);

        in.position(0);
        int maxSkipBytes = in.available();
        int s3 = in.skipBytes(INIT_DATA.length);

        assertEquals(0, s1);
        assertEquals(1, s2);
        //skipBytes skips at most available bytes
        assertEquals(maxSkipBytes, s3);
    }