Extract test helpers to object