public AdSession getAdSession(String httpSessionId) throws AdException {
        Optional<AdSession> adSessionOptional = adSessionRepository.findBySessionId(httpSessionId);
        if (adSessionOptional.isEmpty()) throw new AdException("no adSession found");
        return adSessionOptional.get();
    }
@Test
    public void getAdSession() {
        when(adSessionRepositoryMock.findBySessionId(anyString())).thenReturn(Optional.empty());

        Exception result = assertThrows(AdException.class,
                () -> adService.getAdSession("httpSessionId"));
        assertEquals(result.getMessage(), "no adSession found");
    }