unit test for #2231