Spring MVC Views Unit Testing

This blog post by Stuart Gunter shares some best practices to perform unit testing on Spring MVC views. The concept follows a BDD style to write unit tests that leverages the MVC pattern in much the same way as the real application, but exploits the power of standard unit testing practices like mocking, assertions and verification. This is achieved with the open source software testing tool TestNG and using the infrastructure provided by Spring through its integration testing features in order to execute the unit test. The post shows the code, also available on GitHub, used to do this. It also explains the design decisions that supports this approach.