Added more checks in the unit tests