I don't know how they do it, as I'm sure there are proprietary ways that each company does it, but I know how i'd do it.
I'd devise a battery of tests that encompass most of the normal working modes of the transformer/preamp and extract the difference of the input signal and the output signal.
The difference signal is the change that the UUT (unit under test) does to the input signal.
I'd do these:
High power signal (distortion/compression)
Low power signal (noise)
DC offset (asymmetrical clipping, flux saturation, etc)
Complex signal (Modulated tones, white/brown/pink/random noise)
Simple signal (Sine, sweep)
Impulse signal (transient, step response)
Forward tilt
Reverse tilt
IP2/IP3 (non-linearities and multiple tone mixing)
Phase/group delay
And more.
All these things characterized and then combined will likely give you a good approximation of how a complex system reacts to any given input signal and should allow a good imitation.
These are smart folks doing this, and there is some extremely complex design theory behind some of these things. It's not as simple as one might think.