Added tests for issue 7872