Writing Integration tests, refactor dao and service methods