private static InputStream generateStream(int from, int length) {
        return new ByteArrayInputStream(generateText(from, length).getBytes(UTF_8));
    }
Generates a stream which contains a test text.

@param from   the start index of the text
@param length the length of the generated stream
@return the stream with the test text
tika-core/src/test/java/org/apache/tika/io/TailStreamTest.java