Improved some unit tests