### Question:
FourSum { public static boolean solveInN2(int[] a) { return false; }  static boolean solveInN2(int[] a);  }### Answer:
@Test public void correctTest() { int idx = 0; for (int i = 0; i < 10; i++) { Set<Boolean> s = new HashSet<>(); int k = 1000; while (s.size() < 2) { int N = r.nextInt(k); int[] a = getRandomArray(N, -k * k, k * k); boolean res = FourSum.solveInN2(a); s.add(res); Assert.assertEquals(expect(a), res); idx++; } } System.out.println("test " + idx); }
@Test public void performanceTest() { int N = 1000; int[] a = getRandomArray(N, 1, N * N); long st = System.nanoTime(); Assert.assertEquals(false, FourSum.solveInN2(a)); Assert.assertTrue(System.nanoTime() - st < 250l * 1_000_000); N <<= 1; a = getRandomArray(N, 1, N * N); st = System.nanoTime(); Assert.assertEquals(false, FourSum.solveInN2(a)); Assert.assertTrue(System.nanoTime() - st < 1000l * 1_000_000); }