Adding answer from SO regarding decorator-pattern for testing