Not all testing is as simple as setup data -> run code -> test results. Sometimes these steps can be tricky.
In this talk I make the argument that this shouldn't stop you from tackling the problem, though it pays off to think about what you would and wouldn't test and why.
Regrettably, the slides are not very useful without the talk. Will put up a link when the video is online.