public static void ensureCookieFormat(final String cookieKey) {
        if (cookieKey == null) {
            throw new IllegalArgumentException("Cookie key must not be null");
        }
        final int index = cookieKey.indexOf(':');
        if (index < 1) {
            throw new IllegalArgumentException("Cookie key format must be: namespace:key");
        }
        if (checkNamespace(cookieKey.substring(0, index)).isPresent()) {
            throw new IllegalArgumentException("Invalid characters in cookie namespace: " + cookieKey);
        }
        if (checkValue(cookieKey.substring(index + 1)).isPresent()) {
            throw new IllegalArgumentException("Invalid characters in cookie value: " + cookieKey);
        }
    }
@Test
    void testCookieFormatWithNullValue() {
        assertThrows(IllegalArgumentException.class, () -> CookieUtil.ensureCookieFormat(null));
    }