### Question:
Http { public String submitGet(String url) { String response = ""; try { URL u = new URL(url); HttpURLConnection connection = (HttpURLConnection) u.openConnection(); setupAuthorization(connection); InputStream is = getResponseFrom(connection); response = IOUtils.toString(is); } catch (IOException e) { throw new RuntimeException("Error with connection.", e); } return response; } Http(String user, String password); String submitPost(String url, byte[] postData); String submitGet(String url); InputStream submitGetWithoutAuthentication(String url);  }### Answer:
@Test public void sendingGet() throws Exception { Http http = new Http("", ""); String response = http.submitGet("http: assertThat(response, containsString("<httpMethod>GET</httpMethod>")); }
@Test(expected=RuntimeException.class) public void sendingGetToUnauthorized() throws Exception { Http http = new Http("", ""); http.submitGet("http: }
@Test(expected=RuntimeException.class) public void sendingGetToUnreachable() throws Exception { Http http = new Http("", ""); http.submitGet("http: }