Skip to content

Instantly share code, notes, and snippets.

@dherges
Last active September 25, 2016 12:18
Show Gist options
  • Select an option

  • Save dherges/7cef2e8920003e9c64aac9f8b744c5f8 to your computer and use it in GitHub Desktop.

Select an option

Save dherges/7cef2e8920003e9c64aac9f8b744c5f8 to your computer and use it in GitHub Desktop.
ok-testing-reloaded-medium
public class RetweetsIdRoute implements Route {
private List<Tweet> fetchTweets(long id, int count) {
return IntStream.range(0, 99)
.mapToObj((i) -> {
final Tweet tweet = new Tweet();
tweet.id = id + i;
tweet.text = String.format("Retweet #%s of %s for %s", i, count, id);
tweet.favorited = i % 2 == 0;
return tweet;
})
.collect(Collectors.toList());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment