Use macros and shared examples in tests