ClientGetter { public List<Client> getBestClients() { List<Client> clients = new ArrayList<>(); for (int i = 0; i < 10; ++i) { String firstName = FIRST_NAMES[randomSeed.nextInt(FIRST_NAMES.length)]; String lastName = LAST_NAMES[randomSeed.nextInt(LAST_NAMES.length)]; String coffee = COFFEES[randomSeed.nextInt(COFFEES.length)]; int numberOfOrders = randomSeed.nextInt(100); clients.add(new Client(i, firstName, lastName, coffee, numberOfOrders)); randomDelay(); } return clients; }  List<Client> getBestClients();  }
@Test public void shouldGenerateRandomClients() { ClientGetter repository = new ClientGetter() { @Override protected void randomDelay() { } }; List<Client> bestClients = repository.getBestClients(); assertThat(bestClients).hasSize(10); }