Improved unit test.
Temporarily added debug code.