Unittest for issue #2546