@Test public void getFollowing() { responseHeaders.setContentType(MediaType.APPLICATION_JSON); mockServer.expect(requestTo("https: .andExpect(method(GET)) .andRespond(withSuccess(jsonResource("user-following"), MediaType.APPLICATION_JSON)); assertEquals(17, gitHub.userOperations().getFollowing("williewheeler").size()); }
public List<GitHubUser> getFollowing(String user) { return asList(restTemplate.getForObject(buildUserUri("/following"), GitHubUser[].class, user)); }
UserTemplate extends AbstractGitHubOperations implements UserOperations { public List<GitHubUser> getFollowing(String user) { return asList(restTemplate.getForObject(buildUserUri("/following"), GitHubUser[].class, user)); } }
UserTemplate extends AbstractGitHubOperations implements UserOperations { public List<GitHubUser> getFollowing(String user) { return asList(restTemplate.getForObject(buildUserUri("/following"), GitHubUser[].class, user)); } UserTemplate(RestTemplate restTemplate, boolean isAuthorizedForUser); }
UserTemplate extends AbstractGitHubOperations implements UserOperations { public List<GitHubUser> getFollowing(String user) { return asList(restTemplate.getForObject(buildUserUri("/following"), GitHubUser[].class, user)); } UserTemplate(RestTemplate restTemplate, boolean isAuthorizedForUser); List<GitHubUser> getFollowers(String user); List<GitHubUser> getFollowing(String user); String getProfileId(); GitHubUserProfile getUserProfile(); String getProfileUrl(); }
UserTemplate extends AbstractGitHubOperations implements UserOperations { public List<GitHubUser> getFollowing(String user) { return asList(restTemplate.getForObject(buildUserUri("/following"), GitHubUser[].class, user)); } UserTemplate(RestTemplate restTemplate, boolean isAuthorizedForUser); List<GitHubUser> getFollowers(String user); List<GitHubUser> getFollowing(String user); String getProfileId(); GitHubUserProfile getUserProfile(); String getProfileUrl();  }