### Question:
AdminUserMapper implements DataMapper<AdminUser, AdminUserDto> { @Override public Collection<AdminUser> mapDtosToEntities(Collection<AdminUserDto> input) { return input.stream().map(this::mapDtoToEntity).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 mapDtosToEntities_expectAllMapped() { AdminUserDto adminUserDto1 = new AdminUserDto(); adminUserDto1.setId(UUID.randomUUID()); AdminUserDto adminUserDto2 = new AdminUserDto(); adminUserDto2.setId(UUID.randomUUID()); ArrayList<AdminUserDto> adminUserDtos = new ArrayList<>(2); adminUserDtos.add(adminUserDto1); adminUserDtos.add(adminUserDto2); ArrayList<AdminUser> adminUsers = (ArrayList<AdminUser>) adminUserMapper.mapDtosToEntities(adminUserDtos); assertThat(adminUserDtos, hasSize(2)); assertEquals(adminUserDtos.size(), adminUsers.size()); for (int i = 0; i < adminUserDtos.size(); i++) { assertMapped(adminUserDtos.get(i), adminUsers.get(i)); } }