Improved unit test coverage