Updated test and added helper method