@Test
    void verifyOperation() throws Throwable {
        val city = mock(DatabaseReader.class);
        when(city.city(any(InetAddress.class))).thenReturn(getCityResponse());

        val country = mock(DatabaseReader.class);
        when(country.country(any(InetAddress.class))).thenReturn(getCountryResponse());

        val service = new MaxmindDatabaseGeoLocationService(new MaxmindProperties())
            .withCityDatabaseReader(city)
            .withCountryDatabaseReader(country);
        val response = service.locate("127.0.0.1");
        assertNotNull(response);
        val response2 = service.locate(100.0D, 100.0D);
        assertNull(response2);
    }
This is {@link MaxmindDatabaseGeoLocationServiceTests}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-geolocation-maxmind/src/test/java/org/apereo/cas/support/geo/maxmind/MaxmindDatabaseGeoLocationServiceTests.java