@Test(expected=TruncatedChunkException.class)
public void testMalformedChunkTruncatedChunk() throws Exception {

    final String s = "3\r\n12";
    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);
    Assert.assertEquals(2, decoder.read(dst));
    decoder.read(dst);
}