Refactor testing suite and create test for utitility method