unit test for #2721