By now, you are past the basics and should be familiar with developing Java applications using the Eclipse IDE. Although you must be feeling very confident with your recent acquired skills, before we go any further, you should know that the more you code, the higher are the chances of you introducing a bug into your code. Even with all the facilities provided by Eclipse, things are bound to go wrong as Java applications scale up. So, we need to build a safety net whenever our application code starts to become nontrivial to manage. One way of doing this is to test our programs, and testing is one of the things that we are going to cover in this chapter.
In an ideal world, all problems detected by our tests would be easy to track down and fix. Nevertheless, this is not always the case. It turns out that nasty bugs might make their way into our code. As mentioned, having a good set of tests helps us to spot problems, however, sometimes the feedback...