@ParameterizedTest
    @MethodSource("parametersForTestSortProperties")
    public void testSortProperties(String _testCaseName, String expectedResult, Comparator<MemberScope<?, ?>> sortingLogic) {
        Stream<MemberScope<?, ?>> properties = Stream.of(
                this.createMemberMock(FieldScope.class, false, "c"),
                this.createMemberMock(MethodScope.class, true, "f()"),
                this.createMemberMock(FieldScope.class, true, "e"),
                this.createMemberMock(FieldScope.class, false, "a"),
                this.createMemberMock(MethodScope.class, false, "b()"),
                this.createMemberMock(MethodScope.class, true, "d()"));
        String sortingResult = properties.sorted(sortingLogic)
                .map(MemberScope::getSchemaPropertyName)
                .collect(Collectors.joining(" "));
        Assertions.assertEquals(expectedResult, sortingResult);
    }
Test for the {@link PropertySortUtils} class.
jsonschema-generator/src/test/java/com/github/victools/jsonschema/generator/impl/PropertySortUtilsTest.java