Unit Testing a Utility function that returns a Widget