added unit tests for PR #2835

this is my first unittest here - so... please someone check that it's good enough.