Code example for UncheckedExecutionException

0
 
   @Test(expectedExceptions = UncheckedExecutionException.class) 
   void testDoesntCatchOtherExceptions() { 
      BackoffOnNotFoundWhenGetBucketACL backoff = new BackoffOnNotFoundWhenGetBucketACL(mock); 
 
      expect(mock.getBucketACL("foo")).andThrow(new UncheckedExecutionException(new TimeoutException())); 
 
      replay(mock); 
      backoff.load("foo"); 
      verify(mock); 
   } 
}