Hi,
In the tests i run on my IDE I passed the first 3, but the last one I fail. I get in testPagingByGenre the title “Korengal” instead of “Only the Dead”.
Here is my code:
public List getMoviesByGenre(String sortKey, int limit, int skip, String… genres) {
// query filter
Bson castFilter = Filters.in(“genres”, genres);
// sort key
Bson sort = Sorts.descending(sortKey);
List movies = new ArrayList<>();
// TODO > Ticket: Paging - implement the necessary cursor methods to support simple
// pagination like skip and limit in the code below
//
Iterable findIterable = moviesCollection.find(castFilter).sort(sort).skip(skip).limit(limit);
((FindIterable) findIterable).into(movies);
return movies;
}
Can someone point me out where is my error.