A static method named readMovieRatings in the ratings.FileReader class that takes an ArrayList of Movies and a String as parameters. The method returns an ArrayList of Movies. Write tests for this method in the tests.TestClasses3 class.
The input ArrayList of Movies will contain Movie objects with their title and cast populated. These Movies should not have any ratings added to them. When your program runs, it is intended for this ArrayList to be provided by your readMovies method.
The input String is the name of a file to be read. Test this method with a CSV file where each line matches the format from the movie_ratings.csv file that you can download above (i.e. "title,reviewerId,rating"). The method will return an ArrayList of Movies containing all of the ratings read from the input file. If a Movie from the input ArrayList does not have any ratings in the ratings file, it should not be included in the output ArrayList. If a Movie has been rated that is not included in the input ArrayList, the rating should be ignored.
Movies will have unique titles. Any movies with identical titles have been removed from the source data. Do not write tests where the input ArrayList contains multiple Movies with the same title. If the input file does not exist, the method will return an empty ArrayList.
The Movies in the returned ArrayList may appear in any order. Your tests should accept any order of the returned Movies. The ratings for each Movie must be in the order in which they appear in the file. When testing the Linked List of Ratings for a Movie, you can assume that they are in the same order in which they appear in the file (This will make it simpler to test the Linked List).