use of net.codestory.http.NewCookie in project datashare by ICIJ.
the class ApiKeyFilterTest method test_does_nothing_if_there_is_datashare_cookie.
@Test
public void test_does_nothing_if_there_is_datashare_cookie() throws Exception {
when(context.cookies()).thenReturn(new SimpleCookies() {
{
put("_ds_session_id", new NewCookie("_ds_session_id", "cookie value"));
}
});
Payload payload = apiKeyFilter.apply("url", context, nextFilter);
assertThat(payload).isSameAs(next);
}