### Question:
OntologyResource { @GET @Produces({LD_JSON + UTF_8, JSON + UTF_8}) public Response getOntologyJSON() throws IOException { Response build = Response.ok().entity(getOntologyJsonLD()).build(); return 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_get_ontology_as_jsonld() throws IOException { when(mockOntologyService.getOntology()).thenReturn(THE_MODEL); Response result = resource.getOntologyJSON(); assertEquals(OK.getStatusCode(), result.getStatus()); assertValidJSON(result.getEntity().toString()); }