Refactor integration tests. Add separate for git and hg.
Implementing tests