Expose internal helper method for testing purpose