Tech Debt: Refactor of testing method