Capital One interview question

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