Introduction
In a previous blog article I described how you can integrate Jersey RESTful web services and the Spring framework. I ended that article with a note that I needed to do further research into how to write unit tests for the web services that depend on the Spring framework for dependency injection.
Fortunately, I ran across an article on Naresh's blog, Jersey Test Framework re-visited, where he explains the new version (1.1.2-ea) of the Jersey test framework. In his article he provides a link to the code for the spring-annotations sample test (provided as part of the Jersey project), which is an example of unit testing a web service that uses Spring. So using Naresh's article and the Spring annotations example code I was able to design a demo application that uses Jersey and Spring and that includes some simple unit tests.
[More]