Misc unit tests fixes according to review.
(Summary project coverage is 98.82%)