static void urlEncode(String str, StringBuilder sb) {
        for (int idx = 0; idx < str.length(); ++idx) {
            char c = str.charAt(idx);
            if ('+' == c) {
                sb.append("%2B");
            } else if ('%' == c) {
                sb.append("%25");
            } else {
                sb.append(c);
            }
        }
    }
@Test
    void testUrlEncodeForNullStringBuilder() {
        assertThrows(NullPointerException.class, () -> {
            GroupKey.urlEncode("+", null);
            
            // Method is not expected to return due to exception thrown
        });
        
        // Method is not expected to return due to exception thrown
    }