Refactor tests to fix import's failures