@Test
    public void testRewind() throws IOException {
        InputStream is = createTestInputStream(DEFAULT_TEST_SIZE);
        try (RereadableInputStream ris = new RereadableInputStream(is, MEMORY_THRESHOLD, true)) {
            ris.rewind();  // rewind before we've done anything
            for (int byteNum = 0; byteNum < 1; byteNum++) {
                int byteRead = ris.read();
                assertEquals(byteNum, byteRead, "Byte num should be " + byteNum + " but is " + byteRead + ".");
            }
        }
    }
Read increasingly more of the stream, but not all, with each pass before rewinding to
make sure we pick up at the correct point
tika-core/src/test/java/org/apache/tika/TestRereadableInputStream.java