private String decode(Function<byte[], String> decoder, byte[] b, int iterations) {
        String res = null;
        for (int i = 0; i < iterations; i++) {
            // Append counter to avoid String cache
            byte[] counter = String.valueOf(i).getBytes();
            byte[] result = new byte[b.length + counter.length];
            System.arraycopy(b, 0, result, 0, b.length);
            System.arraycopy(counter, 0, result, b.length, counter.length);
            res = decoder.apply(result);
        }
        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