return contextProperties;
}
public void testLoginWithPasswordSetsSessionKeyAndCookie() {
AccountClient client = requestsSendResponses(
login, loginResponse,
HttpRequest.builder()
.method("GET")
.endpoint("http://localhost:8080/client/api?response=json&command=listAccounts&listAll=true&sessionkey=" + Strings2.urlEncode(sessionKey, '/'))
.addHeader("Accept", "application/json")
.addHeader(HttpHeaders.COOKIE, "JSESSIONID=" + jSessionId)
.build(),
HttpResponse.builder()
.statusCode(200)
.payload(payloadFromResource("/listaccountsresponse.json"))
.build()
,logout, logoutResponse);
assertNotNull(client.listAccounts());
}