Improved unit test performance.

Fixed assert calls in unit tests.