Refactored test.