Following is code executing in production and test:
List currentBatch = terpCustomerTeams.subList(offset, Math.min(offset+itemsPerBatc