public void testFindAndModifyQueryFuture() throws ExecutionException, InterruptedException {
new Fiber<Void>(new SuspendableRunnable() {
@Override
public void run() throws SuspendExecution, InterruptedException {
try {
Document findAndModify = addListenerCalledFlagSetter(mongoColl.findAndModifyAsync(FIND_AND_MODIFY_BUILDER.build())).get();
assertEquals(UPDATE_VALUE.toString(), findAndModify.get(FIELD_INT_NAME).getValueAsString());
assertListenerCalled();
} catch (ExecutionException ex) {
fail(ex.getLocalizedMessage());
}
}