@Test public void applicationJson_profileIncorrect_returns406() throws Exception { // given final RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, "user"); request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.VERSION.getMediaType()); // when final RestfulResponse<UserRepresentation> restfulResponse = request.executeT(); // then assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_ACCEPTABLE)); }
@Before public void setUp() throws Exception { client = webServerRule.getClient(); request = client.createRequest(RestfulHttpMethod.GET, "services"); }