@Test
public void testConfigOfDefaults() {

    Map<String, String> configMap = new HashMap<>();
    configMap.put(Swagger2MarkupProperties.MARKUP_LANGUAGE, MarkupLanguage.MARKDOWN.toString());
    configMap.put("swagger2markup.extensions.uniqueId1.customProperty1", "123");
    configMap.put("swagger2markup.extensions.uniqueId1.customProperty2", "123");
    configMap.put("swagger2markup.extensions.uniqueId2.customPropertyList1", "123,456");
    configMap.put("swagger2markup.uniqueId1.customProperty1", "123");
    configMap.put("swagger2markup.uniqueId1.customProperty2", "123");
    Swagger2MarkupConfig config = new Swagger2MarkupConfigBuilder(configMap)
            .build();
    assertThat(config.getAnchorPrefix()).isNull();
    assertThat(config.getDefinitionOrderBy()).isEqualTo(OrderBy.NATURAL);
    assertThat(config.getDefinitionOrdering()).isEqualTo(Ordering.natural());
    assertThat(config.getDefinitionsDocument()).isEqualTo("definitions");
    assertThat(config.isGeneratedExamplesEnabled()).isFalse();
    assertThat(config.isInlineSchemaEnabled()).isEqualTo(true);
    assertThat(config.getInterDocumentCrossReferencesPrefix()).isNull();
    assertThat(config.getMarkupLanguage().name()).isEqualTo(MarkupLanguage.MARKDOWN.name());
    assertThat(config.getOperationOrderBy()).isEqualTo(OrderBy.NATURAL);
    assertThat(config.getOperationOrdering()).isNotNull();
    assertThat(config.getLanguage()).isEqualTo(Language.EN);
    assertThat(config.getOverviewDocument()).isEqualTo("overview");
    assertThat(config.getParameterOrderBy()).isEqualTo(OrderBy.NATURAL);
    assertThat(config.getParameterOrdering()).isEqualTo(Swagger2MarkupConfigBuilder.PARAMETER_IN_NATURAL_ORDERING.compound(Swagger2MarkupConfigBuilder.PARAMETER_NAME_NATURAL_ORDERING));
    assertThat(config.getPathsDocument()).isEqualTo("paths");
    assertThat(config.getPathsGroupedBy()).isEqualTo(GroupBy.AS_IS);
    assertThat(config.getPropertyOrderBy()).isEqualTo(OrderBy.NATURAL);
    assertThat(config.getPropertyOrdering()).isEqualTo(Ordering.natural());
    assertThat(config.getResponseOrderBy()).isEqualTo(OrderBy.NATURAL);
    assertThat(config.getResponseOrdering()).isEqualTo(Ordering.natural());
    assertThat(config.getSecurityDocument()).isEqualTo("security");
    assertThat(config.getSeparatedDefinitionsFolder()).isEqualTo("definitions");
    assertThat(config.getSeparatedOperationsFolder()).isEqualTo("operations");
    assertThat(config.getTagOrderBy()).isEqualTo(OrderBy.NATURAL);
    assertThat(config.getTagOrdering()).isEqualTo(Ordering.natural());
    assertThat(config.isFlatBodyEnabled()).isFalse();
    assertThat(config.isPathSecuritySectionEnabled()).isTrue();
    assertThat(config.isInterDocumentCrossReferencesEnabled()).isFalse();
    assertThat(config.isSeparatedDefinitionsEnabled()).isFalse();
    assertThat(config.isSeparatedOperationsEnabled()).isFalse();
    assertThat(config.getExtensionsProperties().getKeys()).hasSize(3)
    .containsOnly("uniqueId1.customProperty1",
            "uniqueId1.customProperty2",
            "uniqueId2.customPropertyList1"
            );
    assertThat(config.getExtensionsProperties().getString("uniqueId1.customProperty1").get()).isEqualTo("123");
    assertThat(config.getExtensionsProperties().getPathList("uniqueId2.customPropertyList1")).hasSize(1)
    .containsOnly(Paths.get("123,456"));
}