add test on models and restful api