Refactor tests to a new file