Unit tests.
Fix
Improvements for the tests.