Improvments on unit tests