Capital One Interview Question

How would you deal with legacy code and implement testing plan,