Added some tests for #6499

@samsonasik that's some real good news, thanks! :-)