Refactored for example tests.