adding test cases for GROOVY-6141, GROOVY-4896, GROOVY-5582