Update method and test in dao