Reworked unit tests to get better code coverage.