Small refactor of tests.