### Question:
DataSet { public IUser getUserByName(String name) { for (IUser c : userList) { if (c.getName().equalsIgnoreCase(name)) { return c; } } return null; } 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 testGetUserByName() { User userNotFound = (User) ds.getUserByName("doesNotExist"); assertNull(userNotFound); User user = (User) ds.getUserByName("Meier"); assertNotNull(user); assertTrue(user.hasRentals()); }