Updated unit tests for refactoring