AnyTypeComparator extends AbstractMovieComparator { @Override public boolean areEqual(@NonNull Movie movie1, @NonNull Movie movie2) { LOG.debug( "Comparing types disabled, tried to compare type '{}' with type '{}''", movie1.getType(), movie2.getType() ); return true; }  @Override boolean areEqual(@NonNull Movie movie1, @NonNull Movie movie2);  }
@Test public void areAllEqual() throws Exception { List<Movie> equalMovies = Arrays.asList( new Movie("Inception", 2010), new Movie("Inception", 2010).setType(Movie.Type.DOCUMENTARY), new Movie("Inception", 2010).setType(Movie.Type.SERIES), new Movie("Inception", 2010).setType(Movie.Type.SHORT), new Movie("Inception", 2010).setType(Movie.Type.VIDEO_GAME) ); equalMovies.forEach(m1 -> equalMovies.forEach(m2 -> assertTrue(comparator.areEqual(m1, m2)))); }