add closure testcase