add testcases for map/flatMap/filter