BUG-5775: added unit test