private static ByteLimitedInputStream create(byte[] source, int limit) {
        if (limit > source.length) {
            throw new IllegalArgumentException("Limit is greater than length of source buffer.");
        }
        InputStream wrappedStream = new ByteArrayInputStream(source);
        return new ByteLimitedInputStream(wrappedStream, limit);
    }
@author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
@since 5.1.23
vespaclient-container-plugin/src/test/java/com/yahoo/vespa/http/server/util/ByteLimitedInputStreamTestCase.java