Refactor tests to be isolated.