Pregunta de entrevista de Capital One

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