### Question:
DataSet { public void updateMovie(Movie movie) { for (int i = 0; i < movieList.size(); i++) { if (movieList.get(i).getId() == movie.getId()) { movieList.get(i).setRented(movie.isRented()); movieList.get(i).setPriceCategory(movie.getPriceCategory()); } } } DataSet(DateFormat dateFormat); List<IUser> getUserList(); IUser getUserById(int id); IUser getUserByName(String name); void updateRentalsWithUser(User user); Object[][] getUserListAsObject(); List<Movie> getMovieList(); Object[][] getMovieListAsObject(boolean rented, boolean available); Movie getMovieById(long id); void updateMovie(Movie movie); Object[][] getMovieListAsObject(); List<Rental> getRentalList(); Object[][] getRentalListAsObject(); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void testUpdateMovie() { Movie m1 = ds.getMovieById(1); m1.setRented(!m1.isRented()); ds.updateMovie(m1); Movie m2 = ds.getMovieById(1); assertEquals(m1, m2); }