@Test public void doesNothingWhenCookieInvalid() throws Exception {

  when(request.getCookies()).thenReturn(ImmutableMap.of(SESSION_COOKIE, cookie));
  when(authenticator.authenticate(cookie)).thenReturn(Optional.empty());
  filter.filter(request, response);
  assertThat(response.getHeaders()).doesNotContainKey(SET_COOKIE);
}