Solution and test case.
Removed debug message.