@Nullable
    @VisibleForTesting
    InetAddress getIpFromFieldValue(String fieldValue) {
        try {
            return InetAddresses.forString(fieldValue.trim());
        } catch (IllegalArgumentException e) {
            // Do nothing, field is not an IP
        }

        return null;
    }
@Test
    public void getIpFromFieldValue() {

        when(geoIpVendorResolverService.createCityResolver(any(GeoIpResolverConfig.class), any(Timer.class)))
                .thenReturn(maxMindCityResolver);

        when(geoIpVendorResolverService.createAsnResolver(any(GeoIpResolverConfig.class), any(Timer.class)))
                .thenReturn(maxMindAsnResolver);

        final GeoIpResolverEngine engine = new GeoIpResolverEngine(geoIpVendorResolverService, config, s3GeoIpFileService, metricRegistry);
        final String ip = "127.0.0.1";

        assertEquals(InetAddresses.forString(ip), engine.getIpFromFieldValue(ip));
        assertNull(engine.getIpFromFieldValue("Message from \"127.0.0.1\""));
        assertNull(engine.getIpFromFieldValue("Test message with no IP"));
    }