@Test
public void testExternalDocsComponent() throws URISyntaxException {

 //Given
 Path file = Paths.get(DefinitionComponentTest.class.getResource("/yaml/swagger_petstore_20160612.yaml").toURI());
 Swagger2MarkupConverter converter = Swagger2MarkupConverter.from(file).build();
 Swagger swagger = converter.getContext().getSchema();
 ExternalDocs externalDocs = swagger.getExternalDocs();
 Assert.assertNotNull(externalDocs);
 Swagger2MarkupConverter.SwaggerContext context = converter.getContext();
 MarkupDocBuilder markupDocBuilder = context.createMarkupDocBuilder();
 //When
 markupDocBuilder = new ExternalDocsComponent(context).apply(markupDocBuilder, ExternalDocsComponent.parameters(externalDocs, OverviewDocument.SECTION_TITLE_LEVEL));
 markupDocBuilder.writeToFileWithoutExtension(outputDirectory, StandardCharsets.UTF_8);
 //Then
 Path expectedFile = getExpectedFile(COMPONENT_NAME);
 DiffUtils.assertThatFileIsEqual(expectedFile, outputDirectory, getReportName(COMPONENT_NAME));
}