// Login here so the following request will be authenticated:
Response response = POST("/login", loginUserParams);
assertStatus(StatusCode.FOUND, response);
Map<String, Cookie> cookies = new HashMap<String, Cookie>();
cookies.putAll(response.cookies);
Request request = newRequest();
request.cookies.putAll(cookies);
response = GET(request, api_base);
assertStatus(StatusCode.OK, response);
InputStream is = new ByteArrayInputStream(response.out.toByteArray());
Reader reader = new InputStreamReader(is);