Added some unit tests for regression #7086

Added some unit tests for regression #7086