Added unit test for #299