private static void write(final OutputStream out,
                              final int bufferSize,
                              final int writeSize) throws IOException {
        // Write the output
        final byte[] buffer = buildDataBuffer(bufferSize);
        int writtenSize = 0;
        while (writtenSize < writeSize) {
            out.write(buffer, 0, bufferSize);
            out.flush();
            writtenSize += bufferSize;
        }
        if (writtenSize >= writeSize) {
            throw new IOException("Test Error");
        }
    }
<p>
Runnable Java Program that can act as a test client to the data feed.
</p>
<p>
<p>
Duplicate class with no reuse to allow copy to be placed in documentation.
</p>
stroom-core/src/main/java/stroom/core/tools/ErrorDataFeedClient.java