@Test
public void testAuthenticationNoRememberMe() {

    MockHttpServletRequest request = new MockHttpServletRequest();
    request.setServerName("www.test.com");
    Map<String, String> params = new HashMap<>();
    params.put("username", "user");
    params.put("password", "user");
    params.put("rememberMe", "false");
    MockHttpServletResponse response = new MockHttpServletResponse();
    authenticationService.authenticate(request, response, params);
    //check that cookies are set correctly
    Cookie accessTokenCookie = response.getCookie(OAuth2CookieHelper.ACCESS_TOKEN_COOKIE);
    Assert.assertEquals(ACCESS_TOKEN_VALUE, accessTokenCookie.getValue());
    Cookie refreshTokenCookie = response.getCookie(OAuth2CookieHelper.SESSION_TOKEN_COOKIE);
    Assert.assertEquals(REFRESH_TOKEN_VALUE, OAuth2CookieHelper.getRefreshTokenValue(refreshTokenCookie));
    Assert.assertFalse(OAuth2CookieHelper.isRememberMe(refreshTokenCookie));
}