Hello,
I’m trying to run the test case for getMovieByCountry but it fails every time. I’ve written correct code for MovieDoa.java, can some one pls help me what is wrong with code here.
public List getMoviesByCountry(String… country) {
Below is my code from MovieDoa.java class.
Bson queryFilter = new Document("Countries", new Document("$all", Arrays.asList(country)));
Bson projection = new Document("title", 1);
List<Document> movies = new ArrayList<>();
moviesCollection.find(queryFilter).limit(2).projection(projection).into(movies);
//TODO> Ticket: Projection - implement the query and projection required by the unit test
return movies;
}