int syncBackups(int requestedSyncBackups, int requestedAsyncBackups, boolean syncForced) {
        if (syncForced) {
            // if force sync enabled, then the sum of the backups
            requestedSyncBackups += requestedAsyncBackups;
        }

        InternalPartitionService partitionService = node.getPartitionService();
        int maxBackupCount = partitionService.getMaxAllowedBackupCount();
        return min(maxBackupCount, requestedSyncBackups);
    }
@Test
    public void syncBackups_whenForceSyncDisabled() {
        setup(BACKPRESSURE_ENABLED);

        // when force-sync disabled, we only look at the sync backups
        assertEquals(0, backupHandler.syncBackups(0, 0, FORCE_SYNC_DISABLED));
        assertEquals(1, backupHandler.syncBackups(1, 0, FORCE_SYNC_DISABLED));
        assertEquals(0, backupHandler.syncBackups(0, 0, FORCE_SYNC_DISABLED));
        assertEquals(1, backupHandler.syncBackups(1, 1, FORCE_SYNC_DISABLED));

        // checking to see what happens when we are at or above the maximum number of backups
        assertEquals(BACKUPS, backupHandler.syncBackups(BACKUPS, 0, FORCE_SYNC_DISABLED));
        assertEquals(BACKUPS, backupHandler.syncBackups(BACKUPS + 1, 0, FORCE_SYNC_DISABLED));
    }