Updated tests on tag dao and improved it