UnitTest for issue #561

All tests passing. Issue #561 can be closed