@Test
public void testReadString() throws IOException, B2JsonException {

    checkString("", null);
    checkString("a", null);
    checkString("\"a", null);
    checkString("\"\\x\"", null);
    checkString("\"\"", "");
    checkString("\"abc\"", "abc");
    checkString("\"\\u0000\"", "\u0000");
    checkString("\"\\uffFF\"", "\uffFF");
    checkBackslashUCodePoint("\u0041", 0x41);
    checkBackslashUCodePoint("\u00DF", 0xDF);
    checkBackslashUCodePoint("\u6771", 0x6771);
    checkBackslashUCodePoint("\uD7FF", 0xD7FF);
    checkBackslashUCodePoint("\uE000", 0xE000);
    checkBackslashUCodePoint("\uFFFF", 0xFFFF);
    checkBackslashUCodePoint("\uD802\uDC5A", 0x1085A); // Imperial Aramaic Number Three
    // These cases come from http://www.oracle.com/us/technologies/java/supplementary-142654.html
    checkUtf8CodePoint(new byte[]{0x41}, 0x41);
    checkUtf8CodePoint(new byte[]{(byte) 0xc3, (byte) 0x9f}, 0xDF);
    checkUtf8CodePoint(new byte[]{(byte) 0xe6, (byte) 0x9d, (byte) 0xb1}, 0x6771);
    checkUtf8CodePoint(new byte[]{(byte) 0xf0, (byte) 0x90, (byte) 0x90, (byte) 0x80}, 0x10400);
}