Add unit test for #1368