updateResult.add("Object", object);
JsonObject updatedDefect = new JsonObject();
updatedDefect.addProperty("Name", "Foo");
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();