### Question:
RootResource { @GET @PermitAll public APIRootResponse get(@Context SecurityContext context) { final Map<String, APIRestLink> links = new HashMap<>(); links.put("v1", new APIRestLink(URI.create(Constants.HTTP_V1_ROOT))); return new APIRootResponse(links); }  @GET @PermitAll APIRootResponse get(@Context SecurityContext context);  }### Answer:
@Test public void testGetReturnsAResponse() { final RootResource resource = new RootResource(); final APIRootResponse response = resource.get(TestHelpers.generateSecureSecurityContext()); assertThat(response).isNotNull(); }
@Test public void testGetResponseContainsALinkToTheV1Root() { final RootResource resource = new RootResource(); final APIRootResponse response = resource.get(TestHelpers.generateSecureSecurityContext()); assertHasKeyWithValue( response.getLinks(), "v1", Constants.HTTP_V1_ROOT); }