Adding proper checks to tests