public void execute(final CtkTestResults results) throws ResponseException { results.assertTrue("RequestFactory must be injectable", requestFactory != null); Request<?, ?> request = requestFactory.createRequest(Request.MethodType.GET, "http://google.com"); request.execute(new ResponseHandler() { public void handle(final Response response) throws ResponseException { passed = response.getResponseBodyAsString().contains("Google"); } }); results.assertTrue("Should be able to call http://google.com and get result that contains 'google'", passed); request = requestFactory.createRequest(Request.MethodType.GET, "http://demo.jira.com"); request.addSeraphAuthentication("admin", "admin"); request.execute(new ResponseHandler() { public void handle(final Response response) throws ResponseException { passed = response.getResponseBodyAsString().contains("Joe Administrator"); } }); results.assertTrueOrWarn("Should be able to call http://demo.jira.com and log in using seraph authentication", passed); } }