functional test for GRAILS-10985 and GRAILS-10839