New utility function to create a parent widget from given params that will be given to addMockEnvironment.
ee2b9fae35