anchor.diff:  public void createAndValidateSpringfoxSwaggerJson() throws Exception {
       String designFirstSwaggerLocation = Swagger2MarkupTest.class.getResource("/swagger.yaml").getPath();
   
  -    String outputDir = System.getProperty("io.springfox.staticdocs.outputDir");
       MvcResult mvcResult = this.mockMvc.perform(get("/v2/api-docs")
               .accept(MediaType.APPLICATION_JSON))
  -            .andDo(SwaggerResultHandler.outputDirectory(outputDir).build())
               .andExpect(status().isOk())
               .andReturn();
   
  
positive.code:   <["identifier"]>
  ----
  
  === Validate Springfox Swagger JSON output
  
  If you are using the https://github.com/spring-projects/spring-framework[spring-framework] and https://github.com/springfox/springfox[springfox], you can validate the Swagger JSON output against your contract-first Swagger specification.
  That way you can make sure that the implementation is in compliance with the design specification. 
  
  [source, java]
  
negative.code: compile "io.github.robwin:assertj-swagger:0.1.0"
  ----
  
  === Using assertj-swagger in an integratest test
  
  Using assertj-swagger is simple. For example,if you are using https://github.com/spring-projects/spring-boot[Spring Boot] and https://github.com/springfox/springfox[springfox], you can validate your Swagger JSON in an integration test.
  
  [source, java]
  ----
  @RunWith(SpringJUnit4ClassRunner.class)
  @SpringApplicationConfiguration(classes = Application.class)
  @IntegrationTest
  @WebAppConfiguration
  public class AssertjSwaggerTest {
      @Test
      public void validateThatImplementationFitsDesignSpecification(){
          String designFirstSwagger = SwaggerAssertTest.class.getResource("/swagger.yaml").getPath();
          SwaggerAssertions.assertThat("http://localhost:8080/v2/api-docs")
              .isEqualTo(designFirstSwagger);
      }
  }
  ----
  
  