public String redirectWithSession(AuthenticateRequest params) throws IOException, ParseException, JOSEException, InvalidSignatureException, DienstencatalogusException {
        var session = startSessionFromApp(params);

        return protocol + "://" + appHost+ "/digid-app?data=" + URLEncoder.encode("digid-app-auth://app_session_id=" + session.get("app_session_id") + "&host=" + digidHost + "&browser=safari", StandardCharsets.UTF_8);
    }
@Test
    void redirectWithSessionTest() throws InvalidSignatureException, IOException, ParseException, DienstencatalogusException, JOSEException {
        AuthenticateRequest authenticateRequest = new AuthenticateRequest();
        authenticateRequest.setClientId(client.CLIENT_ID);
        authenticateRequest.setRequest(client.generateRequest());
        authenticateRequest.setRedirectUri("redirect_uri");
        mockDcMetadataResponse();
        when(provider.verifySignature("test", authenticateRequest.getSignedJwt())).thenReturn(true);
        when(appClient.startAppSession(any(), any(), any(), any(), any(), any())).thenReturn(Map.of("id", "SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS"));

        String response = openIdService.redirectWithSession(authenticateRequest);
    }