@VisibleForTesting
  CompletableFuture<Void> cancelBackgroundApnsNotifications(final Account account, final Device device) {
    return pushSchedulingCluster.withCluster(connection -> connection.async()
            .zrem(getPendingBackgroundApnsNotificationQueueKey(account, device), encodeAciAndDeviceId(account, device)))
        .thenRun(Util.NOOP)
        .toCompletableFuture();
  }
@Test
  void testCancelBackgroundApnsNotifications() {
    final Instant now = Instant.now().truncatedTo(ChronoUnit.MILLIS);
    clock.pin(now);

    pushNotificationScheduler.scheduleBackgroundApnsNotification(account, device).toCompletableFuture().join();
    pushNotificationScheduler.cancelBackgroundApnsNotifications(account, device).join();

    assertEquals(Optional.empty(),
        pushNotificationScheduler.getLastBackgroundApnsNotificationTimestamp(account, device));

    assertEquals(Optional.empty(),
        pushNotificationScheduler.getNextScheduledBackgroundApnsNotificationTimestamp(account, device));
  }