Fix suggestions
This commit is contained in:
parent
9ca5b38ad2
commit
cd1c8de735
|
@ -51,7 +51,7 @@ public class CombiningCompletableFuturesUnitTest {
|
|||
// When all CompletableFutures are completed (exceptionally or otherwise)...
|
||||
Map<Boolean, List<Long>> resultsByValidity = clientCalls.stream()
|
||||
.map(this::handleFuture)
|
||||
.collect(Collectors.partitioningBy(this::isValidResponse));
|
||||
.collect(Collectors.partitioningBy(resourceId -> resourceId != -1L));
|
||||
|
||||
// Then the returned resource identifiers should match what is expected...
|
||||
List<Long> validResults = resultsByValidity.getOrDefault(true, List.of());
|
||||
|
@ -64,10 +64,6 @@ public class CombiningCompletableFuturesUnitTest {
|
|||
.error(eq("Encountered error: java.lang.IllegalArgumentException: Bad Resource"));
|
||||
}
|
||||
|
||||
private boolean isValidResponse(long resourceId) {
|
||||
return resourceId != -1L;
|
||||
}
|
||||
|
||||
/**
|
||||
* Completes the given CompletableFuture, handling any exceptions that are thrown.
|
||||
* @param future the CompletableFuture to complete.
|
||||
|
|
Loading…
Reference in New Issue