added some unittest for model and controller