Rewrite the tests via a visistor