@Test public void markRead() throws Exception { String str = "AbCdEfGhIjKlMnOpQrStUvWxYz"; ByteBufferQueue queue = new ByteBufferQueue(10); queue.put(ByteBuffer.wrap(str.getBytes(StandardCharsets.UTF_8))); ByteBufferQueueInputStream instance = new ByteBufferQueueInputStream(queue); assumeThat(instance.markSupported(), is(true)); instance.mark(4); instance.read(new byte[3]); instance.reset(); assertThat(read(instance), is(str)); }