### Question:
RememberMeCookieDecoderImpl extends AbstractRememberMeServices implements RememberMeCookieDecoder { public String exctractRememberMeCookieValue(HttpServletRequest request) { return extractRememberMeCookie(request); }  @Override void afterPropertiesSet(); String exctractRememberMeCookieValue(HttpServletRequest request); String[] extractSeriesAndToken(String cookieValue);  }### Answer:
@Test public void extractCookieShouldReturnValueOfRememberMeCookie() { MockHttpServletRequest request = new MockHttpServletRequest(); String expectedCookieValue = "encoded series and token"; Cookie cookie = new Cookie(SPRING_SECURITY_REMEMBER_ME_COOKIE_KEY, expectedCookieValue); request.setCookies(cookie); String actualCookieValue = decoder.exctractRememberMeCookieValue(request); assertEquals(actualCookieValue, expectedCookieValue, "Extract should return value of remember me cookie."); }
@Test public void extractCookieShouldReturnNullFromRequestWithoutCookies() { MockHttpServletRequest request = new MockHttpServletRequest(); String actualCookieValue = decoder.exctractRememberMeCookieValue(request); assertNull(actualCookieValue, "Extract should return null, because request doesn't contain cookies."); }
@Test public void extractCookieShouldReturnNullForRequestWithoutRememberMeCookie() { MockHttpServletRequest request = new MockHttpServletRequest(); Cookie cookie = new Cookie("name", "encoded series and token"); request.setCookies(cookie); String actualCookieValue = decoder.exctractRememberMeCookieValue(request); assertNull(actualCookieValue, "Extract should return null, because request doesn't contain remember me cookie."); }