89101112131415
{ @Test public void testToString() { HTTPResponseHeaders headers = new HTTPResponseHeaders("HTTP/1.1 200"); assertEquals("HTTP/1.1 200 OK\n", headers.toString()); }
1516171819202122
} @Test public void testToStringWithBadStatusCode() { HTTPResponseHeaders headers = new HTTPResponseHeaders("HTTP/1.1 999"); assertEquals("HTTP/1.1 999\n", headers.toString()); }
222324252627282930
} @Test public void testVersion() { HTTPResponseHeaders headers = new HTTPResponseHeaders(); headers.setVersion("HTTP/1.1"); assertEquals("HTTP/1.1", headers.getVersion()); }
303132333435363738
} @Test public void testStatus() { HTTPResponseHeaders headers = new HTTPResponseHeaders(); headers.setStatus(304); assertEquals(304, headers.getStatus()); }