### Question:
OpenAPIV2Generator { public String generateJson() throws JsonProcessingException { return generateJson(OpenApiV2GeneratorConfigBuilder.empty().build()); } OpenAPIV2Generator(List<String> modelPackages, List<String> controllerBasePackages, Info info);  OpenAPIV2Generator(List<String> modelPackages, List<String> controllerBasePackages, Info info,
							  List<SchemaInterceptor> schemaInterceptors,
							  List<SchemaFieldInterceptor> schemaFieldInterceptors,
							  List<OperationParameterInterceptor> operationParameterInterceptors,
							  List<OperationInterceptor> operationInterceptors,
							  List<RequestBodyInterceptor> requestBodyInterceptors); String generateJson(); String generateJson(OpenApiV2GeneratorConfig config); Swagger generate(OpenApiV2GeneratorConfig config); Swagger generate(); void addSchemaInterceptor(SchemaInterceptor schemaInterceptor); void addSchemaFieldInterceptor(SchemaFieldInterceptor schemaFieldInterceptor); void addOperationParameterInterceptor(OperationParameterInterceptor operationParameterInterceptor); void addOperationInterceptor(OperationInterceptor operationInterceptor); void addRequestBodyInterceptor(RequestBodyInterceptor requestBodyInterceptor); void addGlobalHeader(String name, String description, boolean required);  }### Answer:
@Test public void generateStandardScenario() throws JsonProcessingException { String openAPIJson = createTestGenerator().generateJson(); assertOpenApiResult(openAPIJson, "expected_v2_openapi.json"); }
@Test public void generateStandardScenarioWithCustomConfig() throws JsonProcessingException { String openAPIJson = createTestGenerator().generateJson(OpenApiV2GeneratorConfigBuilder.empty() .withCompatibilityMode(CompatibilityMode.NSWAG) .withBasePath("/test") .withHost("test.com") .build() ); assertOpenApiResult(openAPIJson, "expected_v2_openapi_nswag.json"); }