REFACTOR: unit tests