add tests and throws in DAO hibernate