@Test(expected = NotAuthorizedException.class)
public void rejectsXfcc_requesterSpiffeNotAllowed() {

  when(httpServletRequest.getLocalPort()).thenReturn(xfccAllowedPort);
  when(request.getRequestHeader(ClientAuthFactory.XFCC_HEADER_NAME)).thenReturn(
      List.of(xfccHeader));
  when(securityContext.getUserPrincipal()).thenReturn(xfccPrincipal);
  when(xfccSourceConfig.allowedClientNames()).thenReturn(List.of(xfccName));
  when(xfccSourceConfig.allowedSpiffeIds()).thenReturn(List.of());
  factory.provide(request, httpServletRequest);
}