Add test for rewrite expr using cos