public Map<String, String> startSessionFromApp(@Valid AuthenticateRequest params) throws IOException, ParseException, JOSEException, InvalidSignatureException, DienstencatalogusException {
        var response = dcClient.retrieveMetadataFromDc(params.getClientId());
        validateSignature(response, params);

        adClient.remoteLog("1121", Map.of("webservice_id", response.getLegacyWebserviceId()));

        var oidcSession = startSession(params, response.getMetadataUrl(), response.getLegacyWebserviceId(), response.getServiceName());
        openIdRepository.save(oidcSession);

        var appSession = appClient.startAppSession(
                issuer + "/return?sessionId=" + oidcSession.getId(),
                response.getServiceName(),
                response.getLegacyWebserviceId(),
                response.getMinimumReliabilityLevel(),
                response.getIconUri(),
                oidcSession
        );

        return Map.of("app_session_id", appSession.get("id"));
    }
@Test
    void startSessionFromAppTest() throws DienstencatalogusException, InvalidSignatureException, IOException, ParseException, JOSEException {
        //given
        AuthenticateRequest request = new AuthenticateRequest();
        request.setClientId("PPP");
        request.setRequest(client.generateRequest());
        request.setRedirectUri("redirect_uri");
        DcMetadataResponse dcMetadataResponse = new DcMetadataResponse();
        dcMetadataResponse.setMetadataUrl("testUrl");
        dcMetadataResponse.setLegacyWebserviceId(1L);
        dcMetadataResponse.setAppReturnUrl("redirect_uri");
        dcMetadataResponse.setRequestStatus("STATUS_OK");

        when(dcClient.retrieveMetadataFromDc(request.getClientId())).thenReturn(dcMetadataResponse);
        when(provider.verifySignature(dcMetadataResponse.getMetadataUrl(), signedJwt )).thenReturn(true);
        when(appClient.startAppSession(any(), any(), any(), any(), any(), any())).thenReturn(Map.of("id", "SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS"));
        //when

        openIdService.startSessionFromApp(request);

        //then

    }