SessionInputBuffer datareceiver = new SessionInputBufferMockup("0\r\n", "US-ASCII");
HttpMessage message = new HttpMessageMockup();
// lenient mode
message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, false);
message.addHeader("Content-Type", "unknown");
message.addHeader("Transfer-Encoding", "whatever; param=value, chunked");
message.addHeader("Content-Length", "plain wrong");
EntityDeserializer entitygen = new EntityDeserializer(
new LaxContentLengthStrategy());
HttpEntity entity = entitygen.deserialize(datareceiver, message);