String password = "pass";
String credential = "Basic "
+ new String(Base64.encodeBase64((loginId + ":" + password).getBytes("UTF-8")));
User user = User.findByLoginId(loginId);
Context context = context().withHeader(Http.HeaderNames.AUTHORIZATION, credential);
BasicAuthAction action = new BasicAuthAction();
action.delegate = mock(Action.class);
// When
action.call(context);
// Then
assertThat(context.session()).includes(
entry(UserApp.SESSION_USERID, String.valueOf(user.id)),
entry(UserApp.SESSION_LOGINID, user.loginId),