Cybersource Interview Question

How to write unit test for legacy code?