static boolean isValidIpEntity(String ip) {
        if (ip == null) return true;
        try {
            InetAddress.getByName(ip);
            return true;
        } catch (UnknownHostException e) {
            return false;
        }
    }
@Test
    public void testIsValidIpEntityWithLocalhost() {
        assertTrue(ClientQuotaControlManager.isValidIpEntity("127.0.0.1"));
    }