@Operation(summary = "Start the process and generate the session ids")
    @PostMapping(value = "new", consumes = "application/json", produces = "application/json")
    public StartProcessResponse startProcessRestService(@Valid @RequestBody StartProcessRequest request) {
        StartProcessResponse response = new StartProcessResponse();
        // fill the response with the url for the app
        response.setUrl(publicUrl);

        final String host;
        try {
            host = new URL(request.getReturnUrl()).getHost();
        } catch (MalformedURLException e) {
            throw new ClientException("Malformed URL", e);
        }
        if (!whitelistPattern.matcher(host).matches()) {
            logger.warn("The host given: {}, is not a white listed host!", host);
            throw new ClientException("Invalid return url");
        }
        EidSession session = EidSession.create(request.getReturnUrl(), request.getConfirmId(),
                request.getClientIpAddress(), timeout);
        sessionRepo.save(session);

        response.setSessionId(session.getId());
        response.setConfirmSecret(session.getConfirmSecret());
        response.setExpiration(session.getExpiration());

        // Result OK
        return response;
    }
@Test
    public void testStartProcessRestService() {
        StartProcessRequest request = new StartProcessRequest();
        request.setReturnUrl("http://localhost");
        request.setConfirmId("confirmId");

        // the test
        StartProcessResponse response = controller.startProcessRestService(request);
        // asserts
        assertNotNull(response.getConfirmSecret());
        assertNotNull(response.getSessionId());
        assertEquals("SSSSSSSSSSSSSSSSSSSSSS", response.getUrl());
        assertEquals(600, response.getExpiration());
    }