### Question:
HTTPRequest { public String toString() { final StringBuilder result = new StringBuilder(""); final URI url = m_defaultURL; if (url == null) { result.append("<Undefined URL>\n"); } else { result.append(url.toString()); result.append("\n"); } final NVPair[] defaultHeaders = m_defaultHeaders; for (int i = 0; i < defaultHeaders.length; i++) { result.append(defaultHeaders[i].getName()); result.append(": "); result.append(defaultHeaders[i].getValue()); result.append("\n"); } return result.toString(); } HTTPRequest(); final String getUrl(); final void setUrl(String url); final NVPair[] getHeaders(); final void setHeaders(NVPair[] headers); String toString(); final byte[] getData(); final void setData(byte[] data); final byte[] setDataFromFile(String filename); final NVPair[] getFormData(); final void setFormData(NVPair[] formData); boolean getReadResponseBody(); void setReadResponseBody(boolean b); final HTTPResponse DELETE(); final HTTPResponse DELETE(String uri); final HTTPResponse DELETE(final String uri, NVPair[] headers); final HTTPResponse GET(); final HTTPResponse GET(String uri); final HTTPResponse GET(NVPair[] queryData); final HTTPResponse GET(final String uri, final NVPair[] queryData); final HTTPResponse GET(final String uri,
                                final NVPair[] queryData,
                                NVPair[] headers); final HTTPResponse HEAD(); final HTTPResponse HEAD(String uri); final HTTPResponse HEAD(NVPair[] queryData); final HTTPResponse HEAD(final String uri, final NVPair[] queryData); final HTTPResponse HEAD(final String uri,
                                 final NVPair[] queryData,
                                 NVPair[] headers); final HTTPResponse OPTIONS(); final HTTPResponse OPTIONS(String uri); final HTTPResponse OPTIONS(final String uri, final byte[] data); final HTTPResponse OPTIONS(final String uri,
                                    final byte[] data,
                                    NVPair[] headers); final HTTPResponse OPTIONS(String uri, InputStream inputStream); final HTTPResponse OPTIONS(final String uri,
                                    final InputStream inputStream,
                                    NVPair[] headers); final HTTPResponse POST(); final HTTPResponse POST(String uri); final HTTPResponse POST(NVPair[] formData); final HTTPResponse POST(String uri, NVPair[] formData); final HTTPResponse POST(final String uri,
                                 final NVPair[] formData,
                                 NVPair[] headers); final HTTPResponse POST(final String uri,
                                 final NVPair[] formData,
                                 NVPair[] headers,
                                 boolean isMultipart); final HTTPResponse POST(String uri, byte[] data); final HTTPResponse POST(final String uri,
                                 final byte[] data,
                                 NVPair[] headers); final HTTPResponse POST(String uri, InputStream inputStream); final HTTPResponse POST(final String uri,
                                 final InputStream inputStream,
                                 NVPair[] headers); final HTTPResponse PUT(); final HTTPResponse PUT(String uri); final HTTPResponse PUT(String uri, byte[] data); final HTTPResponse PUT(final String uri,
                                final byte[] data,
                                NVPair[] headers); final HTTPResponse PUT(String uri, InputStream inputStream); final HTTPResponse PUT(final String uri,
                                final InputStream inputStream,
                                NVPair[] headers); final HTTPResponse PATCH(); final HTTPResponse PATCH(String uri); final HTTPResponse PATCH(String uri, byte[] data); final HTTPResponse PATCH(final String uri,
                                final byte[] data,
                                NVPair[] headers); final HTTPResponse PATCH(String uri, InputStream inputStream); final HTTPResponse PATCH(final String uri,
                                final InputStream inputStream,
                                NVPair[] headers); final HTTPResponse TRACE(); final HTTPResponse TRACE(String uri); final HTTPResponse TRACE(final String uri, NVPair[] headers); static Test.InstrumentationFilter getHttpMethodFilter();  }### Answer:
@Test public void testToString() throws Exception { final HTTPRequest request = new HTTPRequest(); assertEquals("<Undefined URL>\n", request.toString()); request.setUrl("http: assertEquals("http: request.setHeaders(new NVPair[] { new NVPair("home", "end"), new NVPair("pause", "insert"), }); assertEquals("http: request.toString()); }