HttpResult { @Override public String toString() { return toString(false); } HttpResult();  HttpResult(HttpResult other); HttpResult setHttpCode(int code, String description); HttpResult setContent(Object content); HttpResult addHeader(String key, String value); boolean isSuccess(); int getHttpReturnCode(); String getHttpReturnCodeDescription(); Collection<HttpRequest.KeyValuePair> getHeaders(); String getHeader(String key); Object getContent(); @Override String toString(); String toString(boolean verbose); void printContent(StringBuilder sb);  }
@Test public void testToString() { assertEquals("HTTP 200/OK", new HttpResult().setContent("Foo").toString()); assertEquals("HTTP 200/OK\n\nFoo", new HttpResult().setContent("Foo").toString(true)); assertEquals("HTTP 200/OK", new HttpResult().toString(true)); assertEquals("HTTP 200/OK", new HttpResult().setContent("").toString(true)); }