### Question:
RememberMeCookieDecoderImpl extends AbstractRememberMeServices implements RememberMeCookieDecoder { public String[] extractSeriesAndToken(String cookieValue) { try { return decodeCookie(cookieValue); } catch (InvalidCookieException e) { return null; } }  @Override void afterPropertiesSet(); String exctractRememberMeCookieValue(HttpServletRequest request); String[] extractSeriesAndToken(String cookieValue);  }### Answer:
@Test public void extractSeriesAndTokenShouldReturnThemFromEncodedCookieValue() { String expectedSeries = "61ikbvB7Nd1Wk3jDXgN/TQ=="; String expectedToken = "FGGNNSS0KoIg7zO9+VlSaw=="; String encodedCookieValue = encodeSeriesAndToken(expectedSeries, expectedToken); String[] actualSeriesAndToken = decoder.extractSeriesAndToken(encodedCookieValue); String actualSeries = actualSeriesAndToken[0]; String actualToken = actualSeriesAndToken[1]; assertEquals(actualSeries, expectedSeries); assertEquals(actualToken, expectedToken); }
@Test public void extractSeriesAndTokenShouldReturnNothingForNotEncodedValue() { String notEncodedCookieValue = "*cookie-octet / ( DQUOTE *cookie-octet DQUOTE )"; String[] actualSeriesAndToken = decoder.extractSeriesAndToken(notEncodedCookieValue); assertNull(actualSeriesAndToken); }