I would like to set up a test (unit or integration test) for a mongo query. I would like to test the following function:
public ArrayList<Document> search(){
Document textSearch = new Document("$text",new
Document("$search",text));
return randomCollection.find(textSearch).into(new ArrayList<Document>());
}
Im using MongoTemplate to get the mongo collection randomCollection