I wrote a book called 'Working Effectively with Legacy Code' that's really all about testing code that is not easy to test - real apps beyond toy examples.
There are techniques in the book but really you should try to write tests for code as you write it. It's the best way to make sure that your code is decoupled enough for testing. If you do that, you don't need the techniques in the book.