Add test for cap task