Chapter 5. Test-driving web components
Test-driving Java EE web components is hard.
A myth
In this chapter, we’ll tackle some of the most common headaches of the modern day Java Platform Enterprise Edition (Java EE) developer trying to apply test-driven development in their everyday job—web components. So far, we’ve mostly seen the kind of stuff that a typical TDD classroom training would present as introductory material. That’s the kind of material that helps us understand the concepts behind the technique and see progress. It’s not that easy to do the same when you have to deal with not just plain old Java objects but with the sometimes heinous Java EE interfaces that allow for great flexibility on paper, but at the cost of non-trivial effort on the part of the developer. After finishing this chapter, we will have ideas and ammunition to take on developing Java EE web components test-first.