@Test
    protected void verifyLoadOps() throws Throwable {
        val eventRepository = getEventRepository();
        eventRepository.removeAll();
        
        val dto1 = getCasEvent("example1");

        eventRepository.save(dto1);
        val dt = ZonedDateTime.now(ZoneOffset.UTC).minusMonths(12);
        val loaded = eventRepository.load(dt);
        assertTrue(loaded.findAny().isPresent());

        assertFalse(eventRepository.getEventsOfTypeForPrincipal(dto1.getType(), dto1.getPrincipalId()).findAny().isEmpty());
        assertFalse(eventRepository.getEventsOfTypeForPrincipal(dto1.getType(), dto1.getPrincipalId(), dt).findAny().isEmpty());

        assertFalse(eventRepository.getEventsOfType(dto1.getType(), dt).findAny().isEmpty());
        assertFalse(eventRepository.getEventsOfType(dto1.getType()).findAny().isEmpty());

        assertFalse(eventRepository.getEventsForPrincipal(dto1.getPrincipalId()).findAny().isEmpty());
        assertFalse(eventRepository.getEventsForPrincipal(dto1.getPrincipalId(), dt).findAny().isEmpty());
    }
This is {@link AbstractCasEventRepositoryTests}.

@author Misagh Moayyed
@since 5.0.0
core/cas-server-core-events/src/test/java/org/apereo/cas/support/events/AbstractCasEventRepositoryTests.java