Refactor unit tests into separate classes