import java.util.Collection; import java.util.*; public class EgnaTest { //private static Collection data1; private static final int TEST_SIZE = 1000000; public static void main(String[] args) { SearchOperations testLetare = new Searcher(new Data().getRecordings()); //Test antal artister long nummerOfArtist = testLetare.numberOfArtists(); System.out.println(nummerOfArtist); } private static Collection generateRandomData() { Collection data = new LinkedList<>(); Random random = new Random(); for (int i = 0; i < TEST_SIZE; i++) { data.add(new Recording("Title" + random.nextInt(TEST_SIZE), "Artist" + random.nextInt(TEST_SIZE / 10), 1900 + random.nextInt(122), random.nextBoolean() ? "LP" : "CD", Set.of("Jazz"))); } return data; } }