@Test(expected=MalformedChunkCodingException.class)
public void testMalformedChunkEndingDecoding() throws Exception {

    final String s = "5\r\n01234\r\n5\r\n56789\r\r6\r\nabcdef\r\n0\r\n\r\n";
    final ReadableByteChannel channel = new ReadableByteChannelMock(
            new String[] {s}, StandardCharsets.US_ASCII);
    final SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, 0, StandardCharsets.US_ASCII);
    final BasicHttpTransportMetrics metrics = new BasicHttpTransportMetrics();
    final ChunkDecoder decoder = new ChunkDecoder(channel, inbuf, metrics);
    final ByteBuffer dst = ByteBuffer.allocate(1024);
    decoder.read(dst);
}