1public void
2 givenListContainsDuplicates_whenRemovingDuplicatesWithJava8_thenCorrect() {
3 List<Integer> listWithDuplicates = Lists.newArrayList(1, 1, 2, 2, 3, 3);
4 List<Integer> listWithoutDuplicates = listWithDuplicates.stream()
5 .distinct()
6 .collect(Collectors.toList());
7}
8