create test code for returning lambdas from a static generator