Improve coverage of unit tests