@Test
    public final void testUtf8ArrayByteBufferInt() {
        final ByteBuffer wrapper = ByteBuffer.wrap(rawBytes);
        Utf8Array otherConstructed = new Utf8Array(wrapper, wrapper.remaining());
        assertNotSame(rawBytes, otherConstructed.getBytes());
        assertArrayEquals(rawBytes, otherConstructed.getBytes());
    }
Check the Utf8Array API behaves as expected.

@author <a href="mailto:steinar@yahoo-inc.com">Steinar Knutsen</a>
vespajlib/src/test/java/com/yahoo/text/Utf8ArrayTestCase.java