Application development is a lengthy and time-consuming process. In each step, there are multiple loopholes where there is a chance of making mistakes. All such mistakes will club together to make a blunder. If this got caught at the end when the final product testing is carried out, it's of no use and the developers will run short of time for development. In this chapter, we discussed various steps such as unit testing, integration testing, and the modules to use for application development in order to reduce the errors in the development with testing. We also saw the complexities to manage request and response objects for carrying out unit testing of controllers. The example covered here showed the use of mock objects. We saw various ways, such as the Spring framework and Mockito, to create such Mock objects. We also covered the MockMVC
object to carry out integration testing.
Now we have a working product, but we haven't taken any measures for securing URLs such as addContact
and...