Improve the unit tests