DRY up testing of transformation

change Interpreter to allow a parser to be passed in