private static String generateText(int from, int length) {
        int count = from + length;
        StringBuilder buf = new StringBuilder(count);
        while (buf.length() < count) {
            buf.append(TEXT);
        }
        return buf.substring(from, from + length);
    }
Generates a test text using the specified parameters.

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