magnet test refactored