IssuesTemplate extends AbstractGithubTemplate implements IssuesOperations { @Override public List<Issue> listOrganizationIssues(String organization) { Map<String, Object> uriVariables = new HashMap<>(); uriVariables.put("organization", organization); return getRestOperations() .exchange(buildUri("/orgs/{organization}/issues?per_page=25", uriVariables), 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 listOrgaIssues() throws Exception { mockServer.expect(requestTo("https: .andRespond( withSuccess(new ClassPathResource("listIssues.json", getClass()), MediaType.APPLICATION_JSON)); List<Issue> issueList = issuesTemplate.listOrganizationIssues("zalando-stups"); Assertions.assertThat(issueList).isNotNull(); Assertions.assertThat(issueList.size()).isEqualTo(1); Assertions.assertThat(issueList.get(0).getId()).isEqualTo(1); }