fix unittests in restapi after refactoring dao