### Question:
PrimeGenerator { public static List<Integer> primeNumbersBruteForce(int max) { final List<Integer> primeNumbers = new LinkedList<Integer>(); for (int i = 2; i <= max; i++) { if (isPrimeBruteForce(i)) { primeNumbers.add(i); } } return primeNumbers; }  static List<Integer> sieveOfEratosthenes(int n); static List<Integer> primeNumbersBruteForce(int max); static List<Integer> primeNumbersTill(int max);  }### Answer:
@Test public void whenBruteForced_returnsSuccessfully() { final List<Integer> primeNumbers = primeNumbersBruteForce(20); assertEquals(Arrays.asList(new Integer[] { 2, 3, 5, 7, 11, 13, 17, 19 }), primeNumbers); }