### Question:
ByteBufferInputStream extends InputStream { @Override public synchronized void mark(int readlimit) { myBuffer.mark(); } ByteBufferInputStream(ByteBuffer buffer); @Override int available(); @Override synchronized void mark(int readlimit); @Override boolean markSupported(); @Override int read(); @Override int read(byte[] b); @Override int read(byte[] array, int offset, int length); @Override synchronized void reset(); @Override long skip(long n);  }### Answer:
@Test public void testMark() throws IOException { ByteBuffer buf = createBuffer(); ByteBufferInputStream bbis = new ByteBufferInputStream(buf); Assert.assertTrue(bbis.markSupported()); Assert.assertEquals(5, bbis.skip(5)); Assert.assertEquals(OFFSET + 5, buf.position()); bbis.mark(0); Assert.assertEquals(5, bbis.skip(5)); Assert.assertEquals(OFFSET + 10, buf.position()); bbis.reset(); Assert.assertEquals(OFFSET + 5, buf.position()); }