@Test
    public void testDecodeFirstByteOfMultibyteChar() throws Exception
    {
        // Setup test fixture.
        final byte[] multibyteCharacter = "\u3053".getBytes(StandardCharsets.UTF_8); // 3-byte character.
        final XMLLightweightParser parser = new XMLLightweightParser();
        final ByteBuf in = ByteBufAllocator.DEFAULT.buffer(3);
        in.writeBytes(Arrays.copyOfRange(multibyteCharacter, 0, 1));

        // Execute system under test.
        final char[] result = parser.decode(in);

        // Verify results.
        assertEquals(0, result.length);
        assertEquals(0, in.readerIndex());
    }
Verifies that {@link XMLLightweightParser#decode(ByteBuf)} does not read anything from a byte array, and does not
progress its reader index, when the provided content is only the first byte of a multi-byte character.

@see <a href="https://igniterealtime.atlassian.net/browse/OF-458">issue OF-458: XMPPDecoder has a decode problem for UTF-8</a>
@see <a href="https://igniterealtime.atlassian.net/browse/OF-2814">issue OF-2814: Issue with cyrilic (any multi-byte?) characters in messages</a>
xmppserver/src/test/java/org/jivesoftware/openfire/nio/XMLLightweightParserTest.java