[CLEANUP] Clean up and refactor the tests.