### Question:
OpenApi20SpecificationGenerator implements SpecificationGenerator { @Override public String generate(ApiDetails details, List<ResourceModel> models) { return generator.generateAndSerialize( models, details.getBasePath(), details.getHost(), details.getSchemes(), details.getName(), details.getDescription(), SpecificationGeneratorUtils.createTagDescriptionsMap(details.getTags()), details.getVersion(), SpecificationGeneratorUtils.createOauth2Configuration(details.getAuthConfig()), details.getFormat().name().toLowerCase() ); } OpenApi20SpecificationGenerator();  OpenApi20SpecificationGenerator(OpenApi20Generator generator); @Override Specification getSpecification(); @Override String generate(ApiDetails details, List<ResourceModel> models);  }### Answer:
@Test public void testGenerateWithDefaults() { ApiDetails apiDetails = new ApiDetails(); ResourceModel model = resource( "book-get", "Get a book by id", "book", request( "/book/{id}", HTTPMethod.GET, list( requiredParam("id", "The unique identifier for the book.", "NUMBER") ), emptyList() ), response( 200, "application/hal+json", list( field("title", "Title of the book", "STRING"), field("author", "Author of the book", "STRING"), field("pages", "Number of pages in the book", "NUMBER") ) ) ); String rawOutput = generator.generate(apiDetails, list(model)); assertThat(rawOutput) .isEqualToNormalizingNewlines(contentOfResource("/mock-specs/default-settings.yml")); }