@Test
public void testSecuritySchemeComponent() throws URISyntaxException {

    //Given
    Path file = Paths.get(SecuritySchemeComponentTest.class.getResource("/yaml/swagger_petstore.yaml").toURI());
    Swagger2MarkupConverter converter = Swagger2MarkupConverter.from(file).build();
    Swagger swagger = converter.getContext().getSchema();
    List<SwaggerPathOperation> pathOperations = PathUtils.toPathOperationsList(swagger.getPaths(), "", "",
            converter.getContext().getConfig().getOperationOrdering());
    Swagger2MarkupConverter.SwaggerContext context = converter.getContext();
    MarkupDocBuilder markupDocBuilder = context.createMarkupDocBuilder();
    //When
    markupDocBuilder = new SecuritySchemeComponent(context, new SecurityDocumentResolver(context))
            .apply(markupDocBuilder, SecuritySchemeComponent.parameters(pathOperations.get(0), 3));
    markupDocBuilder.writeToFileWithoutExtension(outputDirectory, StandardCharsets.UTF_8);
    //Then
    Path expectedFile = getExpectedFile(COMPONENT_NAME);
    DiffUtils.assertThatFileIsEqual(expectedFile, outputDirectory, getReportName(COMPONENT_NAME));
}