Based on the Heroku example for Spring MVC Tomcat Hibernate this example includes test code and an extra use case.