This chapter covers
Unit-testing all types of EJBs: session beans, entity beans, and message-driven beans
Using mock objects, pure JUnit, and Cactus
Automating packaging, deployment, and container start/stop using Ant
“The time has come,” the Walrus said, “To talk of many things: Of shoes—and ships—and sealing-wax—Of cabbages—and kings—And why the sea is boiling hot—And whether pigs have wings.”
|--Lewis Carroll, Through the Looking Glass|
Testing EJBs has a reputation of being a difficult task. One of the main reasons is that EJBs are components that run inside a container. Thus, you either need to abstract out the container services used by your code or perform in-container unit testing. In this chapter, we’ll demonstrate ...