@Test
    public void testTailBufferPartlyRead() throws IOException {
        final int count = 64;
        TailStream stream = new TailStream(generateStream(0, count), 2 * count);
        byte[] data = readStream(stream);
        assertArrayEquals(data, stream.getTail(), "Wrong buffer length");
        stream.close();
    }
Tests the content of the tail buffer if it is only partly filled.
tika-core/src/test/java/org/apache/tika/io/TailStreamTest.java