### Question:
TranslationResource { @GET @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8") @Path("{locale}") public final Response getTranslations(@PathParam("locale") String locale) { return Response.ok().entity(cachedTranslations.get(locale)).build(); } TranslationResource();  TranslationResource(RDFRepository repo); @GET @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8") @Path("{locale}") final Response getTranslations(@PathParam("locale") String locale);  }### Answer:
@Test public void should_return_ok_when_getting_english_and_norwegian() { Response response1 = translationResource.getTranslations("en"); assertThat(response1.getStatus(), equalTo(Status.OK.getStatusCode())); Response response2 = translationResource.getTranslations("no"); assertThat(response2.getStatus(), equalTo(Status.OK.getStatusCode())); }
@Test public void should_actually_return_some_translations_for_format_language_audience() { Response response = translationResource.getTranslations("no"); Type hashMapType = new TypeToken<HashMap<String, String>>(){}.getType(); Map<String, String> translations = new Gson().fromJson(response.getEntity().toString(), hashMapType); assertThat(translations.get("http: assertThat(translations.get("http: assertThat(translations.get("http: assertThat(translations.get("http: }