### Question:
StringUtils extends org.apache.commons.lang3.StringUtils { public static String getIp(HttpServletRequest request) { String ip = request.getHeader("x-forwarded-for"); if (ip == null || ip.length() == 0 || UNKNOWN.equalsIgnoreCase(ip)) { ip = request.getHeader("Proxy-Client-IP"); } if (ip == null || ip.length() == 0 || UNKNOWN.equalsIgnoreCase(ip)) { ip = request.getHeader("WL-Proxy-Client-IP"); } if (ip == null || ip.length() == 0 || UNKNOWN.equalsIgnoreCase(ip)) { ip = request.getRemoteAddr(); } String comma = ","; String localhost = "127.0.0.1"; if (ip.contains(comma)) { ip = ip.split(",")[0]; } if (localhost.equals(ip)) { try { ip = InetAddress.getLocalHost().getHostAddress(); } catch (UnknownHostException e) { log.error(e.getMessage(), e); } } return ip; }  static String toCamelCase(String s); static String toCapitalizeCamelCase(String s); static String getIp(HttpServletRequest request); static String getCityInfo(String ip); static String getHttpCityInfo(String ip); static String getLocalCityInfo(String ip); static String getBrowser(HttpServletRequest request); static String getWeekDay(); static String getLocalIp();  }### Answer:
@Test public void testGetIP() { assertEquals("127.0.0.1", getIp(new MockHttpServletRequest())); }