@POST
  @Path("/select-idp")
  @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
  public Response postSelectIdp(
      @CookieParam("session_id") String sessionId,
      @FormParam("identityProvider") String identityProvider) {

    var redirect =
        authService.selectedIdentityProvider(new SelectedIdpRequest(sessionId, identityProvider));
    return Response.seeOther(redirect).build();
  }
@Test
  void selectIdp_passParams() {

    var sessionId = IdGenerator.generateID();

    var selectedIdpIssuer = "https://aok-testfalen.example.com";

    var idpRedirect = URI.create(selectedIdpIssuer).resolve("/auth/login");

    var authService = mock(AuthService.class);
    when(authService.selectedIdentityProvider(any())).thenReturn(idpRedirect);
    var sut = new AuthEndpoint(authService);

    // when
    try (var res = sut.postSelectIdp(sessionId, selectedIdpIssuer)) {
      // then
      var captor = ArgumentCaptor.forClass(SelectedIdpRequest.class);
      verify(authService).selectedIdentityProvider(captor.capture());

      var req = captor.getValue();
      assertEquals(selectedIdpIssuer, req.selectedIdentityProvider());
      assertEquals(sessionId, req.sessionId());
    }
  }