@Test
    public final void testEqualsObject() {
        assertTrue(toCheck.equals(raw));
        assertFalse(toCheck.equals(new Utf8Array(new byte[] {})));
        assertFalse(toCheck.equals(new Utf8Array(Utf8.toBytes(" " + raw.substring(1)))));
        assertTrue(toCheck.equals(toCheck));
        assertTrue(toCheck.equals(new Utf8Array(rawBytes)));
    }
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