mock Definition in BaseTestCase
remove redundant state in UpdateReferencesVisitor
handle setting currentDefinition/currentModule while creating new transformers from transformers