@NonNull
  public URI selectedIdentityProvider(@NonNull SelectedIdpRequest request) {

    var selectedIdp = request.selectedIdentityProvider();
    if (selectedIdp == null || selectedIdp.isBlank()) {
      throw new ValidationException(new Message("error.noProvider"));
    }

    var session = mustFindSession(request.sessionId());

    var step2 = session.selectSectoralIdpStep().redirectToSectoralIdp(selectedIdp);

    var federatedLogin = step2.idpRedirectUri();

    var newSession = session.toBuilder().trustedSectoralIdpStep(step2).build();

    sessionRepo.save(newSession);

    return federatedLogin;
  }
@Test
  void selectIdp_nothingSelected() {

    var sessionId = "1234";
    var sut = new AuthService(BASE_URI, null, null, null, null, null);

    // when
    assertThrows(
        ValidationException.class,
        () -> sut.selectedIdentityProvider(new SelectedIdpRequest(sessionId, null)));
  }