@Test
    public void decodeSurrogatePairs() {
        String foo = "a\uD800\uDC00b";
        //unicode
        //0x61 0x10000 0x62
        //utf-16
        //0x61 0xD800DC00 0x62
        //utf-8
        //0x61 0xF0908080 0x62
        int[] indexes = calculateStringPositions(Utf8.toBytes(foo));
        assertThat(indexes.length, is(7));
        assertThat(indexes[0], is(0)); //a
        assertThat(indexes[1], is(1)); //10000
        assertThat(indexes[2], is(1)); //10000
        assertThat(indexes[3], is(1)); //10000
        assertThat(indexes[4], is(1)); //10000
        assertThat(indexes[5], is(2)); //b
    }
@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