UpdateRequest request = new UpdateRequest("/defect/1234", updatedDefect);
doReturn(new Gson().toJson(response)).when(api.client).doPost(request.toUrl(), request.getBody());
UpdateResponse updateResponse = api.update(request);
verify(api.client).doPost(request.toUrl(), request.getBody());
Assert.assertTrue(updateResponse.wasSuccessful());
JsonObject obj = updateResponse.getObject();
assertEquals(obj.get("_ref").getAsString(), "/defect/1234");
}
public void shouldDelete() throws Exception {