Rewrite tests wip