@Operation(summary = "Request a new mijn digid session based on an app session")
    @PostMapping(value = "/request_session", consumes = "application/json")
    public ResponseEntity<?> requestSession(@RequestBody @Valid MijnDigidSessionRequest request){
        if(request == null || request.getAppSessionId() == null) {
            return ResponseEntity.badRequest().build();
        }

        String mijnDigiDSessionId = mijnDigiDSessionService.createSession(request.getAppSessionId()).getId();
        return ResponseEntity
                .ok()
                .header(MijnDigidSession.MIJN_DIGID_SESSION_HEADER, mijnDigiDSessionId)
                .build();
    }
@Test
    void validateValidRequest() {
        MijnDigidSessionRequest request = new MijnDigidSessionRequest();
        String appSessionId = "id";
        request.setAppSessionId(appSessionId);
        MijnDigidSession session = new MijnDigidSession(1L);
        when(mijnDigiDSessionService.createSession(appSessionId)).thenReturn(session);

        ResponseEntity<?> response = mijnDigiDSessionController.requestSession(request);

        verify(mijnDigiDSessionService, times(1)).createSession(appSessionId);
        assertEquals(HttpStatus.OK, response.getStatusCode());
        assertEquals(session.getId(), response.getHeaders().get(MijnDigidSession.MIJN_DIGID_SESSION_HEADER).get(0) );
    }