@Test
public void testNoBackupFutureExecutedSuccess() {

  // First future succeeds soon enough.
  Future<Integer> originalFuture = getFuture(50, 1, true);
  Function0<Future<Integer>> backupFunctionFuture = getBackupFutureFunctionWithSuccess(500, 2);
  Future<Integer> speculativeFuture = FutureUtil.getSpeculativeFuture(
      originalFuture, backupFunctionFuture, 100, STATS_PREFIX);
  assertEquals(1, speculativeFuture.get().intValue());
  assertFalse(isBackupFutureInvoked);
  checkStats(0, 0, 0);
}