@Test
public void simpleResponse() throws Exception {

  ODataResponse response = new ODataResponse();
  response.setStatusCode(HttpStatusCode.OK.getStatusCode());
  response.setHeader(HttpHeader.CONTENT_TYPE, ContentType.APPLICATION_JSON.toContentTypeString());
  response.setHeader(HttpHeader.CONTENT_LENGTH, String.valueOf(200));
  response.setContent(IOUtils.toInputStream("Walter Winter" + CRLF));
  AsyncResponseSerializer serializer = new AsyncResponseSerializer();
  InputStream in = serializer.serialize(response);
  String result = IOUtils.toString(in);
  assertEquals("HTTP/1.1 200 OK" + CRLF
      + "Content-Type: application/json" + CRLF
      + "Content-Length: 200" + CRLF + CRLF
      + "Walter Winter" + CRLF, result);
}