statusline = new BasicStatusLine(HttpVersion.HTTP_1_1, HttpStatus.SC_OK, null);
assertEquals("HTTP/1.1 200", statusline.toString());
}
public void testFormatting() throws Exception {
StatusLine statusline = new BasicStatusLine(HttpVersion.HTTP_1_1, HttpStatus.SC_OK, "OK");
String s = BasicStatusLine.format(statusline);
assertEquals("HTTP/1.1 200 OK", s);
statusline = new BasicStatusLine(HttpVersion.HTTP_1_1, HttpStatus.SC_OK, null);
s = BasicStatusLine.format(statusline);
assertEquals("HTTP/1.1 200 ", s);
// compare with "testParseSuccess" above: trailing space is correct
}