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. There is a suggested series for this topic.