### Question:
AdminUserMapper implements DataMapper<AdminUser, AdminUserDto> { @Override public Collection<AdminUserDto> mapEntitiesToDtos(Collection<AdminUser> input) { return input.stream().map(this::mapEntityToDto).collect(Collectors.toList()); }  @Override AdminUser mapDtoToEntity(AdminUserDto input); @Override AdminUserDto mapEntityToDto(AdminUser input); @Override Collection<AdminUser> mapDtosToEntities(Collection<AdminUserDto> input); @Override Collection<AdminUserDto> mapEntitiesToDtos(Collection<AdminUser> input);  }### Answer:
@Test public void mapEntitiesToDtos_expectAllMapped() { AdminUser adminUser1 = new AdminUser(); adminUser1.setId(UUID.randomUUID()); AdminUser adminUser2 = new AdminUser(); adminUser2.setId(UUID.randomUUID()); ArrayList<AdminUser> adminUsers = new ArrayList<>(2); adminUsers.add(adminUser1); adminUsers.add(adminUser2); ArrayList<AdminUserDto> adminUserDtos = (ArrayList<AdminUserDto>) adminUserMapper.mapEntitiesToDtos(adminUsers); assertThat(adminUsers, hasSize(2)); assertEquals(adminUsers.size(), adminUserDtos.size()); for (int i = 0; i < adminUsers.size(); i++) { assertMapped(adminUsers.get(i), adminUserDtos.get(i)); } }