public static String getClientIp(ServerHttpRequest request) {
        for (String header : IP_HEADER_NAMES) {
            String ipList = request.getHeaders().getFirst(header);
            if (StringUtils.hasText(ipList) && !UNKNOWN.equalsIgnoreCase(ipList)) {
                String[] ips = ipList.trim().split("[,;]");
                for (String ip : ips) {
                    if (StringUtils.hasText(ip) && !UNKNOWN.equalsIgnoreCase(ip)) {
                        return ip;
                    }
                }
            }
        }
        var remoteAddress = request.getRemoteAddress();
        return remoteAddress == null || remoteAddress.isUnresolved()
            ? UNKNOWN : remoteAddress.getAddress().getHostAddress();
    }
@Test
    void testGetUnknownIPAddressWhenRemoteAddressIsNull() {
        var request = MockServerHttpRequest.get("/").build();
        var actual = IpAddressUtils.getClientIp(request);
        assertEquals(IpAddressUtils.UNKNOWN, actual);
    }