Add test for collection API