rewrite test case