Imrove unit tests