Refactored tests for parallel runs