### Question:
SortUser { public Set<User> sort(List<User> list) { return new TreeSet<>(list); }  Set<User> sort(List<User> list); List<User> sortNameLength(List<User> list); List<User> sortByAllFields(List<User> list);  }### Answer:
@Test public void ifSortUserListThenReturnTreeMapWithSortingUsersById() { User first = new User("Egor", 1); User second = new User("Oleg", 2); User third = new User("Ivan", 3); SortUser testSort = new SortUser(); Set<User> result = testSort.sort(new ArrayList<>(asList(first, third, second))); Set<User> expect = new LinkedHashSet<>(asList(first, second, third)); assertThat(result, is(expect)); }