Tests and refactoring for BulkActions API