boil codegen test down to a simpler function