doReturn(new Gson().toJson(response)).when(api.client).doPost(request.toUrl(), request.getBody());
CreateResponse createResponse = api.create(request);
verify(api.client).doPost(request.toUrl(), request.getBody());
Assert.assertTrue(createResponse.wasSuccessful());
JsonObject createdObj = createResponse.getObject();
assertEquals(createdObj.get("_ref").getAsString(), "/defect/1234");
}
public void shouldUpdate() throws Exception {