### Question:
FriendTemplate extends AbstractTwitterOperations implements FriendOperations { public CursoredList<Long> getIncomingFriendships() { return getIncomingFriendships(-1); } FriendTemplate(RestTemplate restTemplate, boolean isAuthorizedForUser, boolean isAuthorizedForApp); CursoredList<TwitterProfile> getFriends(); CursoredList<TwitterProfile> getFriendsInCursor(long cursor); CursoredList<TwitterProfile> getFriends(long userId); CursoredList<TwitterProfile> getFriendsInCursor(long userId, long cursor); CursoredList<TwitterProfile> getFriends(String screenName); CursoredList<TwitterProfile> getFriendsInCursor(String screenName, long cursor); CursoredList<Long> getFriendIds(); CursoredList<Long> getFriendIdsInCursor(long cursor); CursoredList<Long> getFriendIds(long userId); CursoredList<Long> getFriendIdsInCursor(long userId, long cursor); CursoredList<Long> getFriendIds(String screenName); CursoredList<Long> getFriendIdsInCursor(String screenName, long cursor); CursoredList<TwitterProfile> getFollowers(); CursoredList<TwitterProfile> getFollowersInCursor(long cursor); CursoredList<TwitterProfile> getFollowers(long userId); CursoredList<TwitterProfile> getFollowersInCursor(long userId, long cursor); CursoredList<TwitterProfile> getFollowers(String screenName); CursoredList<TwitterProfile> getFollowersInCursor(String screenName, long cursor); CursoredList<Long> getFollowerIds(); CursoredList<Long> getFollowerIdsInCursor(long cursor); CursoredList<Long> getFollowerIds(long userId); CursoredList<Long> getFollowerIdsInCursor(long userId, long cursor); CursoredList<Long> getFollowerIds(String screenName); CursoredList<Long> getFollowerIdsInCursor(String screenName, long cursor); String follow(long userId); String follow(String screenName); String unfollow(long userId); String unfollow(String screenName); TwitterProfile enableNotifications(long userId); TwitterProfile enableNotifications(String screenName); TwitterProfile disableNotifications(long userId); TwitterProfile disableNotifications(String screenName); CursoredList<Long> getIncomingFriendships(); CursoredList<Long> getIncomingFriendships(long cursor); CursoredList<Long> getOutgoingFriendships(); CursoredList<Long> getOutgoingFriendships(long cursor);  }### Answer:
@Test public void getIncomingFriendships() { mockServer.expect(requestTo("https: .andExpect(method(GET)) .andRespond(withSuccess(jsonResource("incoming-or-outgoing-friendships"), APPLICATION_JSON)); CursoredList<Long> friendships = twitter.friendOperations().getIncomingFriendships(); assertIncomingOutgoingFriendships(friendships); }
@Test public void getIncomingFriendships_cursored() { mockServer.expect(requestTo("https: .andExpect(method(GET)) .andRespond(withSuccess(jsonResource("incoming-or-outgoing-friendships"), APPLICATION_JSON)); CursoredList<Long> friendships = twitter.friendOperations().getIncomingFriendships(1234567); assertIncomingOutgoingFriendships(friendships); }