Add tests for collections (partial #31)