@Test
  public void testSendError() throws IOException {
    wrapper.sendError(404);
    verify(response).sendError(404);

    wrapper.sendError(404, "error message");
    verify(response).sendError(404, "error message");
  }
wrapper should set all headers except "content-length"
hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestGZIPResponseWrapper.java