@Test public void usernameAndPasswordAreSendWithRequest() throws Exception { respondWhenBasicAuthIsGiven(SC_OK, OK_RESPONSE); respond401WhenNoBasicAuthenticationIsGiven(); String content = httpHelper.retrieveContent(baseUrl, A_USERNAME, A_PASSWORD); assertEquals(OK_RESPONSE, content); }
public String retrieveContent(String url) throws IOException { return doGetAsString(url, null, null); }
HttpHelper { public String retrieveContent(String url) throws IOException { return doGetAsString(url, null, null); } }
HttpHelper { public String retrieveContent(String url) throws IOException { return doGetAsString(url, null, null); } HttpHelper(); }
HttpHelper { public String retrieveContent(String url) throws IOException { return doGetAsString(url, null, null); } HttpHelper(); String retrieveContent(String url); byte[] post(String url, byte[] content, String username, String password); byte[] post(String url, byte[] content, String username, String password,
            Map<String, String> headers); String retrieveContent(String url, String username, String password); List<String> queryXml(String url, String username, String password, String... xpathQueries); void setConnectionTimeout(int connectionTimeout); }
HttpHelper { public String retrieveContent(String url) throws IOException { return doGetAsString(url, null, null); } HttpHelper(); String retrieveContent(String url); byte[] post(String url, byte[] content, String username, String password); byte[] post(String url, byte[] content, String username, String password,
            Map<String, String> headers); String retrieveContent(String url, String username, String password); List<String> queryXml(String url, String username, String password, String... xpathQueries); void setConnectionTimeout(int connectionTimeout);  }