Code example for ListenableFuture

Methods: get

0
    assertTrue(execResults.get());
 
    // The result of restore is supposed to be a ListenableFuture<StatusReply>, which I can't cast 
    // to ErrorReply. Should get() throw an Exception instead? 
    try { 
      ErrorReply reply = (ErrorReply) restoreResults.get();
      fail("Should have thrown an exception"); 
    } catch (ExecutionException re) {
      Assert.assertTrue(re.getCause() instanceof RedisException);
    } catch (Exception e) {
      fail("Should have thrown an ExecutionException"); 
    } 
  } 
} 
Connect your IDE to all the code out there  Get Codota for Java