### Question:
OntologyResource { @GET @Produces({TURTLE + UTF_8 + DEFAULT, PLAIN + UTF_8}) public Response getOntologyTurtle() throws IOException { return Response.ok().entity(RDFModelUtil.stringFrom(ontologyService.getOntology(), Lang.TURTLE)).build(); } OntologyResource();  OntologyResource(OntologyService ontologyService); @GET @Produces({TURTLE + UTF_8 + DEFAULT, PLAIN + UTF_8}) Response getOntologyTurtle(); @GET @Produces({LD_JSON + UTF_8, JSON + UTF_8}) Response getOntologyJSON();  }### Answer:
@Test public void should_return_something_that_likely_is_turtle() throws IOException { OntologyService service = new FileBasedOntologyService(); when(mockOntologyService.getOntology()).thenReturn(service.getOntology()); Response result = resource.getOntologyTurtle(); String actual = reduceWhiteSpace(result.getEntity().toString()); assertThat(actual, containsString("@prefix rdf: <http: }