I had a problem for a while, that I could not figure out why my tests were failing, when Global Variables were used in keywords. So the GlobalVariable method needs to be called before it could be used.
import internal.GlobalVariable as GlobalVariable
def GlobalVariable = new GlobalVariable()