IssuesTemplate extends AbstractGithubTemplate implements IssuesOperations { @Override public List<Issue> listUserIssues() { return getRestOperations().exchange(buildUri("/user/issues?per_page=25"), HttpMethod.GET, null, issueListTypeRef).getBody(); } IssuesTemplate(RestOperations restOperations);  IssuesTemplate(RestOperations restOperations, GithubApiUriUtil githubApiUriUtil); @Override List<Issue> listAllIssues(); @Override List<Issue> listUserIssues(); @Override List<Issue> listOrganizationIssues(String organization); @Override Issue createIssue(IssueRequest issueRequest, String owner, String repo);  }
@Test public void listUserIssues() throws Exception { mockServer.expect(requestTo("https: .andRespond( withSuccess(new ClassPathResource("listIssues.json", getClass()), MediaType.APPLICATION_JSON)); List<Issue> issueList = issuesTemplate.listUserIssues(); Assertions.assertThat(issueList).isNotNull(); Assertions.assertThat(issueList.size()).isEqualTo(1); Assertions.assertThat(issueList.get(0).getId()).isEqualTo(1); }