Dao: add dao test case and implementation