IpUtil { public static URI createHttpUri(final String host) { return createUri(HTTP_SCHEME, host); } private  IpUtil(); static URI getClientIpFromRequest(final HttpServletRequest request,
            final HawkbitSecurityProperties securityProperties); static URI getClientIpFromRequest(final HttpServletRequest request, final String forwardHeader); static URI createUri(final String scheme, final String host); static URI createAmqpUri(final String host, final String exchange); static URI createHttpUri(final String host); static boolean isHttpUri(final URI uri); static boolean isAmqpUri(final URI uri); static boolean isIpAddresKnown(final URI uri);  }
@Test @Description("Tests create http uri ipv4 and ipv6") public void testCreateHttpUri() { final String ipv4 = "10.99.99.1"; URI httpUri = IpUtil.createHttpUri(ipv4); assertHttpUri(ipv4, httpUri); final String host = "myhost"; httpUri = IpUtil.createHttpUri(host); assertHttpUri(host, httpUri); final String ipv6 = "0:0:0:0:0:0:0:1"; httpUri = IpUtil.createHttpUri(ipv6); assertHttpUri("[" + ipv6 + "]", httpUri); }