Test cases for #350