Little more unit test coverage, and reduced code duplication between the unit tests