adapting promises test to completable futures