@Test
public void testCreateEntityInputChunked() throws Exception {

    final InputStream inStream = Mockito.mock(InputStream.class);
    final ClassicHttpResponse message = new BasicClassicHttpResponse(200, "OK");
    final HttpEntity entity = conn.createIncomingEntity(message, conn.inBuffer, inStream, ContentLengthStrategy.CHUNKED);
    Assert.assertNotNull(entity);
    Assert.assertTrue(entity.isChunked());
    Assert.assertEquals(-1, entity.getContentLength());
    final InputStream content = entity.getContent();
    Assert.assertNotNull(content);
    Assert.assertTrue((content instanceof ChunkedInputStream));
}