ticket:1 rewrite tests