Slightly modified the unit tests to get them reliable.