I have been mocking a test for a function ResultSetFuture, I used a example from Github (that works) for testing ResultSetFuture, but the code I am testing/mocking uses Futures#successfulAsList as shown here. So in Line 34, the test just halts and never finishes. The code shown below is a portion of the test that halts.
ResultSetFuture future = Mockito.mock(ResultSetFuture.class);
Mockito.doReturn(result).when(future).get();
Mockito.doReturn(future).when(session).executeAsync(Mockito.anyString());
ResultSetFuture resultF = session.executeAsync("select value from table where key='a'");
Future<List<ResultSet>> data = Futures.successfulAsList(new ArrayList(){{ add(resultF); }});
List finished = data.get(); // <---- The test stops here