@Test public void testMalformedChunkTruncatedChunk() throws Exception {
  String s="3\r\n12";
  ReadableByteChannel channel=new ReadableByteChannelMock(new String[]{s},"US-ASCII");
  HttpParams params=new BasicHttpParams();
  SessionInputBuffer inbuf=new SessionInputBufferImpl(1024,256,params);
  HttpTransportMetricsImpl metrics=new HttpTransportMetricsImpl();
  ChunkDecoder decoder=new ChunkDecoder(channel,inbuf,metrics);
  ByteBuffer dst=ByteBuffer.allocate(1024);
  Assert.assertEquals(2,decoder.read(dst));
  try {
    decoder.read(dst);
    Assert.fail("MalformedChunkCodingException should have been thrown");
  }
 catch (  MalformedChunkCodingException ex) {
  }
}
