refactor: unit tests