### Question:
AdminUserService { public Collection<UUID> getAllAdmins() { return Lists.newArrayList(adminUserRepository.findAll()).stream() .map(AdminUser::getId) .collect(Collectors.toList()); } @Autowired  AdminUserService(AdminUserRepository adminUserRepository, UserService userService); Boolean isCurrentUserAdmin(); Collection<UUID> getAllAdmins(); User addAdmin(AdminUser newAdminUser); void removeAdmin(UUID adminToRemove);  }### Answer:
@Test public void getAllAdmins_noAdmins_expectedEmptyList() { setupGetAllAdminsTest(); Collection<UUID> actual = adminUserService.getAllAdmins(); Assert.assertEquals(0, actual.size()); }
@Test public void getAllAdmins_oneAdmin_expectedOneEntry() { setupGetAllAdminsTest(); adminUsersToReturn.add(adminUser1); Collection<UUID> actual = adminUserService.getAllAdmins(); Assert.assertEquals(1, actual.size()); Assert.assertTrue(actual.contains(adminUserUuid1)); }
@Test public void getAllAdmins_twoAdmins_expectedTwoEntries() { setupGetAllAdminsTest(); adminUsersToReturn.add(adminUser1); adminUsersToReturn.add(adminUser2); Collection<UUID> actual = adminUserService.getAllAdmins(); Assert.assertEquals(2, actual.size()); Assert.assertTrue(actual.contains(adminUserUuid1)); Assert.assertTrue(actual.contains(adminUserUuid2)); }