public AdSession updateAdSession(AdSession session, Map<String, Object> body) throws AdValidationException {
        session.setAuthenticationLevel((Integer) body.get("authentication_level"));
        session.setAuthenticationStatus((String) body.get("authentication_status"));
        session.setBsn((String) body.get("bsn"));
        session.setPolymorphIdentity(valueToStringOrNull(body, "polymorph_identity"));
        session.setPolymorphPseudonym(valueToStringOrNull(body, "polymorph_pseudonym"));

        BeanPropertyBindingResult result = new BeanPropertyBindingResult(session, "adSession");
        ValidationUtils.invokeValidator(new AdSessionValidator(), session, result);
        if (result.hasErrors()) {
            throw new AdValidationException("AdSession validation error", result);
        }

        adSessionRepository.save(session);

        return session;
    }
@Test
    public void updateAdSession() throws AdValidationException {
        HashMap<String, Object> body = new HashMap<>();
        body.put("authentication_level", 10);
        body.put("authentication_status", AdAuthenticationStatus.STATUS_SUCCESS.label);
        body.put("bsn", "PPPPPPPPP");

        AdSession result = adService.updateAdSession(new AdSession(), body);

        assertNotNull(result);
        assertEquals(result.getAuthenticationLevel(), 10);
        assertEquals(result.getAuthenticationStatus(), "success");
        assertEquals(result.getBsn(), "PPPPPPPPP");
    }