GetRequest request = new GetRequest("/defect/1234");
doReturn(new Gson().toJson(response)).when(api.client).doGet(request.toUrl());
GetResponse getResponse = api.get(request);
verify(api.client).doGet(request.toUrl());
Assert.assertTrue(getResponse.wasSuccessful());
JsonObject obj = getResponse.getObject();
assertEquals(obj.get("_ref").getAsString(), "/defect/1234");
}
public void shouldQueryOnePage() throws Exception {