@Test
public void getCommentsWithErrorTest() {

    // Setup
    doThrow(new MobiException()).when(requestManager).getComments(any(Resource.class));
    Response response = target().path("merge-requests/" + encode(request1.getResource().stringValue()) + "/comments").request().get();
    assertEquals(response.getStatus(), 500);
    verify(requestManager).getComments(eq(request1.getResource()));
}