message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, false);
message.addHeader(new Header("Content-Type", "unknown"));
message.addHeader(new Header("Transfer-Encoding", "whatever; param=value, chunked"));
message.addHeader(new Header("Content-Length", "plain wrong"));
EntityDeserializer entitygen = new DefaultEntityDeserializer();
HttpEntity entity = entitygen.deserialize(datareceiver, message);
assertNotNull(entity);
assertEquals(-1, entity.getContentLength());
assertTrue(entity.isChunked());
assertTrue(entity.getContent() instanceof ChunkedInputStream);