Update unit tests for refactored code