Updated API for better pass of unittests.
Make sure we don't exit from test before first paint happened