APPENDIX Solutions to Exercises
This chapter gathers the solutions to the exercises given in the chapters. We have recapped the exercises along with their possible solutions. You can also download the working code samples as stated in the Code Download section.
CHAPTER 1
Exercise 1
Investigate the in-container test frameworks available today. What are their biggest advantages and disadvantages compared to testing outside the container?
Solution to Exercise 1
Few in-container server-side testing frameworks are available. One of them is Arquillian, developed at JBoss.org. It enables developers to write integration tests for business objects executed inside a container. The container may be a Java EE application server, or a Servlet/Web Container. You can find more information about Arquillian at http://arquillian.org/.
The other in-container test framework available is the Jersey Test Framework. Jersey is the reference implementation of the JAX-RS specification, and the Jersey Test Framework is used to test RESTful web applications developed using Jersey remotely. You can find more information about the Jersey Test Framework at https://jersey.java.net/documentation/latest/ test-framework.html.
Advantages of in-container testing ...
Get Beginning Spring now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.