Adding utility method to allow unit tests