added method createUserVariableFromVariableFragment and refactored some testcases