test(library/rewriter): add lambda_rewrite tests