Add tests for collect()