static String isHostParam(final String given) {
        final String hostUri = StringHelper.notEmpty(given, "host");

        final Matcher matcher = HOST_PATTERN.matcher(given);

        if (!matcher.matches()) {
            throw new IllegalArgumentException(
                    "host must be an absolute URI (e.g. http://api.example.com), given: `" + hostUri + "`");
        }

        return hostUri;
    }
@Test
    public void nullHostParamsAreNotAllowed() {
        assertThrows(IllegalArgumentException.class,
                () -> RestOpenApiHelper.isHostParam(null));
    }