### Question:
LotteryMachine { List<String> draw(List<String> emails) { System.out.println("Draw for the seed: " + getSeed()); Random rnd = new Random(getSeed()); Set<String> winners = new HashSet<>(); while (winners.size() < Math.min(winnersCount, emails.size())) { int index = rnd.nextInt(emails.size()); System.out.println("Ball: " + index); winners.add(emails.get(index)); } return new ArrayList<>(winners); } LotteryMachine(int winnersCount);   }### Answer:
@Test(timeout = 10) public void oneEmail() throws InterruptedException { LotteryMachine machine = new LotteryMachine(2); List<String> result = machine.draw(Collections.singletonList("test")); Assert.assertEquals(1, result.size()); }
@Ignore("todo: 13131") @Test(timeout = 100) public void fiveEmails() { List<String> result = lotteryMachine .draw(Arrays.asList("0", "1", "2", "3", "4")); assertEquals(5, result.size()); Assert.assertTrue(result.contains("0")); Assert.assertTrue(result.contains("1")); Assert.assertTrue(result.contains("2")); Assert.assertTrue(result.contains("3")); Assert.assertTrue(result.contains("4")); }