Remove wrong usage of shared examples and introduce embedded class methods (as kind of simple "RSpec macros") to reduce code duplication.