InetAddressValidator implements Serializable { public boolean isValid(String inetAddress) { return isValidInet4Address(inetAddress); }  static InetAddressValidator getInstance(); boolean isValid(String inetAddress); boolean isValidInet4Address(String inet4Address);  }
@Test public void testisValid() { assertFalse(InetAddressValidator.getInstance().isValid(null)); assertFalse(InetAddressValidator.getInstance().isValid("")); assertFalse(InetAddressValidator.getInstance().isValid("ab.c@yahoo.com")); assertTrue(InetAddressValidator.getInstance().isValid("192.168.3.10")); }