@Test
  public void asyncBackups_whenForceSyncDisabled() {
    setup(BACKPRESSURE_ENABLED);

    // when forceSync disabled, only the async matters
    assertEquals(0, backupHandler.asyncBackups(0, 0, FORCE_SYNC_DISABLED));
    assertEquals(1, backupHandler.asyncBackups(0, 1, FORCE_SYNC_DISABLED));
    assertEquals(0, backupHandler.asyncBackups(2, 0, FORCE_SYNC_DISABLED));
    assertEquals(1, backupHandler.asyncBackups(2, 1, FORCE_SYNC_DISABLED));

    // see what happens when we reach maximum number of backups
    assertEquals(BACKUPS, backupHandler.asyncBackups(0, BACKUPS + 1, FORCE_SYNC_DISABLED));
  }
  @Test
  public void asyncBackups_whenForceSyncEnabled() {
    setup(true);

    // when forceSync is enabled, then async should always be 0
    assertEquals(0, backupHandler.asyncBackups(0, 0, FORCE_SYNC_ENABLED));
    assertEquals(0, backupHandler.asyncBackups(0, 1, FORCE_SYNC_ENABLED));
    assertEquals(0, backupHandler.asyncBackups(2, 0, FORCE_SYNC_ENABLED));
    assertEquals(0, backupHandler.asyncBackups(2, 1, FORCE_SYNC_ENABLED));

    // see what happens when we reach maximum number of backups
    assertEquals(0, backupHandler.asyncBackups(0, BACKUPS + 1, FORCE_SYNC_ENABLED));
  }