Refactor unit tests
Merge branch 'refactor-tests'