@Test
public void testConfigOfProperties() throws IOException {

    Properties properties = new Properties();
    properties.load(Swagger2MarkupConfigBuilderTest.class.getResourceAsStream("/config/config.properties"));
    Swagger2MarkupConfig config = new Swagger2MarkupConfigBuilder(properties).build();
    assertThat(config.getAnchorPrefix()).isEqualTo("anchorPrefix");
    assertThat(config.getDefinitionOrderBy()).isEqualTo(OrderBy.AS_IS);
    assertThat(config.getDefinitionOrdering()).isNull();
    assertThat(config.getDefinitionsDocument()).isEqualTo("definitionsTest");
    assertThat(config.isGeneratedExamplesEnabled()).isTrue();
    assertThat(config.isHostnameEnabled()).isEqualTo(false);
    assertThat(config.isInlineSchemaEnabled()).isEqualTo(false);
    assertThat(config.getInterDocumentCrossReferencesPrefix()).isEqualTo("xrefPrefix");
    assertThat(config.getMarkupLanguage().name()).isEqualTo(MarkupLanguage.MARKDOWN.name());
    assertThat(config.getOperationOrderBy()).isEqualTo(OrderBy.NATURAL);
    assertThat(config.getOperationOrdering()).isEqualTo(Swagger2MarkupConfigBuilder.OPERATION_PATH_NATURAL_ORDERING.compound(Swagger2MarkupConfigBuilder.OPERATION_METHOD_NATURAL_ORDERING));
    assertThat(config.getLanguage()).isEqualTo(Language.RU);
    assertThat(config.getOverviewDocument()).isEqualTo("overviewTest");
    assertThat(config.getParameterOrderBy()).isEqualTo(OrderBy.AS_IS);
    assertThat(config.getParameterOrdering()).isNull();
    assertThat(config.getPathsDocument()).isEqualTo("pathsTest");
    assertThat(config.getPathsGroupedBy()).isEqualTo(GroupBy.TAGS);
    assertThat(config.getPropertyOrderBy()).isEqualTo(OrderBy.AS_IS);
    assertThat(config.getPropertyOrdering()).isNull();
    assertThat(config.getResponseOrderBy()).isEqualTo(OrderBy.AS_IS);
    assertThat(config.getResponseOrdering()).isNull();
    assertThat(config.getSecurityDocument()).isEqualTo("securityTest");
    assertThat(config.getSeparatedDefinitionsFolder()).isEqualTo("definitionsTest");
    assertThat(config.getSeparatedOperationsFolder()).isEqualTo("operationsTest");
    assertThat(config.isListDelimiterEnabled()).isEqualTo(true);
    assertThat(config.getListDelimiter()).isEqualTo(Character.valueOf('|'));
    assertThat(config.getTagOrderBy()).isEqualTo(OrderBy.AS_IS);
    assertThat(config.getTagOrdering()).isNull();
    assertThat(config.isFlatBodyEnabled()).isTrue();
    assertThat(config.isPathSecuritySectionEnabled()).isFalse();
    assertThat(config.isInterDocumentCrossReferencesEnabled()).isTrue();
    assertThat(config.isSeparatedDefinitionsEnabled()).isTrue();
    assertThat(config.isSeparatedOperationsEnabled()).isTrue();
    assertThat(config.getExtensionsProperties().getKeys()).hasSize(5)
    .containsOnly("uniqueId1.customProperty1",
            "uniqueId1.customProperty2",
            "uniqueId2.customProperty1",
            "uniqueId2.customProperty2",
            "uniqueId2.customPropertyList1"
            );
    assertThat(config.getExtensionsProperties().getPathList("uniqueId2.customPropertyList1")).hasSize(2)
    .containsOnly(Paths.get("123"), Paths.get("456"));
}