  @Test
  public void HalfFail() throws Exception {

    final int N = 7;
    String[] urls = new String[N];
    for (int i = 0; i < N; ++i) {
      urls[i] = String.format("%d", i);
    }
    Semaphore done = new Semaphore(0);
    Race.start(new HalfProber(), urls, (int index) -> {
      assertTrue(index >= 0);
      assertTrue(index < N);
      // Only the even-numbered servers succeeded.
      assertEquals(0, index % 2);
      done.release();
    });
    done.acquire();
  }