@Test
public void testGetBearerTokenCustomCookieHeader() {

    when(authContextInfo.getTokenHeader()).thenReturn(COOKIE);
    when(authContextInfo.getTokenCookie()).thenReturn("CustomCookie");
    AbstractBearerTokenExtractor target = newTarget(h -> null, c -> {
        if ("CustomCookie".equals(c)) {
            return "THE_TOKEN";
        }
        return null;
    });
    String bearerToken = target.getBearerToken();
    assertEquals("THE_TOKEN", bearerToken);
}