@SuppressFBWarnings("NP_NONNULL_PARAM_VIOLATION") // Not a bug
  synchronized CompletableFuture<Void> getFutureForSequenceNumber(final long seqNum) {
    if (seqNum <= lastCompletedSequenceNumber) {
      return CompletableFuture.completedFuture(null);
    }
    return sequenceNumberFutures.computeIfAbsent(seqNum, k -> new CompletableFuture<>());
  }
@Test
  public void shouldReturnFutureForExistingSequenceNumber() {
    // Given:
    final CompletableFuture<Void> existingFuture = futureStore.getFutureForSequenceNumber(2);

    // When:
    final CompletableFuture<Void> newFuture = futureStore.getFutureForSequenceNumber(2);

    // Then:
    assertThat(newFuture, is(sameInstance(existingFuture)));
  }