@Test
public void acceptMergeRequestWithBadArgumentsTest() {

    // Setup:
    doThrow(new IllegalArgumentException()).when(requestManager).acceptMergeRequest(any(Resource.class), any(User.class));
    Response response = target().path("merge-requests/" + encode(request1.getResource().stringValue()))
            .request().post(Entity.entity("", MediaType.TEXT_PLAIN));
    assertEquals(response.getStatus(), 400);
}