public static Comparator<BaseOptionModel> createGroupAndLabelComparator() {
        return new EndpointOptionGroupAndLabelComparator();
    }
@Test
    public void testSort2() throws IOException {
        final String json = PackageHelper.loadText(new File(
                Objects.requireNonNull(getClass().getClassLoader().getResource("json/test_component4.json")).getFile()));
        final ComponentModel componentModel = JsonMapper.generateComponentModel(json);

        componentModel.getComponentOptions().sort(EndpointHelper.createGroupAndLabelComparator());

        assertEquals("baseUri,clearHeaders,cryptoContextProperties,disallowDoctypeDecl,"
                     + "keySelector,omitXmlDeclaration,lazyStartProducer,outputNodeSearch,outputNodeSearchType,"
                     + "outputXmlEncoding,removeSignatureElements,schemaResourceUri,secureValidation,"
                     + "validationFailedHandler,xmlSignature2Message,xmlSignatureChecker,basicPropertyBinding,"
                     + "uriDereferencer,verifierConfiguration",
                componentModel.getComponentOptions().stream()
                        .map(ComponentOptionModel::getName).collect(Collectors.joining(",")));
    }