Extracted function for stubbing away.