Added unit test for #301