add a test function which calls a closure.