make tests use CompletableFuture
refactor to return additional info