@Test
  public void applicationJson_invalid() throws Exception {

    final String href = givenLinkToService();

    final RestfulRequest request =
        client
            .createRequest(HttpMethod.GET, href)
            .withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.USER.getMediaType());
    final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();

    assertThat(restfulResponse.getStatus(), is(HttpStatusCode.NOT_ACCEPTABLE));
  }
  @Test
  public void applicationJson() throws Exception {

    final String href = givenLinkToService();

    final RestfulRequest request =
        client
            .createRequest(HttpMethod.GET, href)
            .withHeader(RestfulRequest.Header.ACCEPT, MediaType.APPLICATION_JSON_TYPE);
    final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();

    assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
  }