StatusesTemplate extends AbstractGithubTemplate implements StatusesOperations { @Override public CombinedStatus getCombinedStatus(String owner, String repository, String ref) { Map<String, Object> uriVariables = new HashMap<>(); uriVariables.put("owner", owner); uriVariables.put("repository", repository); uriVariables.put("ref", ref); return getRestOperations().exchange(buildUri("/repos/{owner}/{repository}/commits/{ref}/status", uriVariables), HttpMethod.GET, null, CombinedStatus.class).getBody(); } StatusesTemplate(RestOperations restOperations); @Override Status createStatus(String owner, String repository, String sha, StatusRequest body); @Override List<Status> listStatuses(String owner, String repository,String ref); @Override CombinedStatus getCombinedStatus(String owner, String repository, String ref);  }
@Test public void combinedStatuses() throws Exception { mockServer.expect(requestTo("https: .andExpect(method(HttpMethod.GET)) .andRespond(withSuccess(jsonResource("combinedStatus"), APPLICATION_JSON)); CombinedStatus status = statusesTemplate.getCombinedStatus("zalando-stups", "blub", "abcdefgh1234567"); Assertions.assertThat(status).isNotNull(); Assertions.assertThat(status.getTotalCount()).isEqualTo(2); Assertions.assertThat(status.getRepository().getId()).isEqualTo(1296269); }