@ParameterizedTest
    @MethodSource("parametersForTestDescriptionResolver")
    public void testDescriptionResolver(String fieldName, boolean asContainerItem, String expectedMemberDescription, String expectedTypeDescription) {
        new SwaggerModule().applyToConfigBuilder(this.configBuilder);

        TestType testType = new TestType(TestClassForDescription.class);
        FieldScope field = testType.getMemberField(fieldName);
        if (asContainerItem) {
            field = field.asFakeContainerItemScope();
        }

        ArgumentCaptor<ConfigFunction<FieldScope, String>> memberCaptor = ArgumentCaptor.forClass(ConfigFunction.class);
        Mockito.verify(this.fieldConfigPart).withDescriptionResolver(memberCaptor.capture());
        String memberDescription = memberCaptor.getValue().apply(field);
        Assertions.assertEquals(expectedMemberDescription, memberDescription);

        ArgumentCaptor<ConfigFunction<TypeScope, String>> typeCaptor = ArgumentCaptor.forClass(ConfigFunction.class);
        Mockito.verify(this.typesInGeneralConfigPart).withDescriptionResolver(typeCaptor.capture());
        TypeScope scope = Mockito.mock(TypeScope.class);
        Mockito.when(scope.getType()).thenReturn(field.getType());
        String typeDescription = typeCaptor.getValue().apply(scope);
        Assertions.assertEquals(expectedTypeDescription, typeDescription);
    }
Test for the {@link SwaggerModule} class.
jsonschema-module-swagger-1.5/src/test/java/com/github/victools/jsonschema/module/swagger15/SwaggerModuleTest.java