"Legacy code. The phrase strikes disgust in the hearts of programmers. It conjures images of slogging through a murky swamp of tangled undergrowth with leaches beneath and stinging flies above. It conjures odors of murk, slime, stagnancy, and offal. Although our first joy of programming may have been intense, the misery of dealing with legacy code is often sufficient to extinguish that flame."
– Michael C. Feathers, Working Effectively with Legacy Code
Understanding the legacy code
Working with testing impediments
Designing for testability with Mockito and PowerMock