Improve stability of unit test (for run with code coverage)