Fixed broken test and helper method