Refactored tests using macros.