@Test
public void testWhenXForwardedForHeaderUseHeader() {

  final String clientIp = "127.0.0.1:10000";
  final String upstreamIp = "192.168.1.1:10000";
  final Map<String, String> headers = new HashMap<>();
  headers.put("X-Forwarded-For", upstreamIp);
  final String ip = WebUtils.getRealClientIpAddr(headers, clientIp);
  assertEquals(ip, "192.168.1.1");
}