RedmineClient { public int getIssueCount() throws IOException { Request request = new Request.Builder() .url(url + "/issues.json") .build(); Response response = client.newCall(request).execute(); JSONObject jsonObject = new JSONObject(response.body().string()); return jsonObject.getInt("total_count"); } RedmineClient(String url); int getIssueCount();  }
@Test public void canGetIssueCount() throws Exception { RedmineClient redmineClient = new RedmineClient( redmineContainer.getRedmineUrl()); assertEquals( "The issue count can be retrieved.", 0, redmineClient.getIssueCount()); }