private byte[] encode(Function<String, byte[]> encoder, String s, int iterations) {
        byte[] res = null;
        for (int i = 0; i < iterations; i++) {
            res = encoder.apply(s + i); // Append counter to avoid String cache
        }
        return res;
    }
@author <a href="mailto:borud@yahoo-inc.com">Bjorn Borud</a>
@author <a href="mailto:steinar@yahoo-inc.com">Steinar Knutsen</a>
vespajlib/src/test/java/com/yahoo/text/Utf8TestCase.java