Approval testing is a great technique for the situation when you have difficult code which lacks tests but you need to change. See also Legacy