Test rewrite for new refactored code