@Test
    void verifyTestWhenAuthenticationRiskVerified() throws Throwable {
        val authentication = CoreAuthenticationTestUtils.getAuthentication("casuser");
        val service = RegisteredServiceTestUtils.getRegisteredService("test");
        val request = new MockHttpServletRequest();
        request.setRemoteAddr("157.181.99.223");
        request.setLocalAddr("227.4.6.1");
        request.addHeader(HttpHeaders.USER_AGENT, "Firefox");
        val clientInfo = ClientInfo.from(request);
        ClientInfoHolder.setClientInfo(clientInfo);
        val score = authenticationRiskEvaluator.evaluate(authentication, service, ClientInfo.from(request));

        val event = new CasEvent();
        event.setType(CasRiskyAuthenticationVerifiedEvent.class.getCanonicalName());
        val nowInEpoch = Instant.now(Clock.systemUTC()).toEpochMilli();
        event.putTimestamp(nowInEpoch);
        val dt = DateTimeUtils.zonedDateTimeOf(nowInEpoch);
        event.setCreationTime(dt.toInstant());
        event.putClientIpAddress(clientInfo.getClientIpAddress());
        event.putServerIpAddress(clientInfo.getServerIpAddress());
        event.putAgent(clientInfo.getUserAgent());
        event.setPrincipalId(authentication.getPrincipal().getId());
        casEventRepository.save(event);
        assertFalse(authenticationRiskEvaluator.isRiskyAuthenticationScore(score, authentication, service));
    }
This is {@link IpAddressAuthenticationRequestRiskCalculatorTests}.

@author Misagh Moayyed
@since 5.1.0
support/cas-server-support-electrofence/src/test/java/org/apereo/cas/impl/calcs/IpAddressAuthenticationRequestRiskCalculatorTests.java