Small refactor to the test