Cybersource interview question

How to write unit test for legacy code?