@Operation(summary= "Create new session and return information")
    @PostMapping(value = "new", consumes = "application/json", produces = "application/json")
    public CreateResponse create(@Valid @RequestBody CreateRequest request) {
        if (request.getDrivingLicences().isEmpty() && request.getTravelDocuments().isEmpty()) {
            throw new BadRequestException("No card information specified");
        }

        final RdaSession session = RdaSession.create(
                request.getReturnUrl(), request.getConfirmId(), request.getClientIpAddress(), timeout
        );
        session.getApp().setDrivingLicences(request.getDrivingLicences());
        session.getApp().setTravelDocuments(request.getTravelDocuments());
        sessionRepo.save(session);

        final CreateResponse response = new CreateResponse();
        response.setUrl(publicUrl);
        response.setSessionId(session.getId());
        response.setConfirmSecret(session.getConfirmSecret());
        response.setExpiration(session.getExpiration());
        return response;
    }
@Test
    public void testCreateRestServiceWithError() {
        CreateRequest request = new CreateRequest();
        request.setDrivingLicences(new ArrayList<>());
        request.setTravelDocuments(new ArrayList<>());
        Exception exception = assertThrows(BadRequestException.class, () -> {
            controller.create(request);;
        });
        assertEquals("No card information specified", exception.getMessage());

    }