This is the sixth of a series of articles about setting up a secure RESTful Web Service using Spring 3.1 and Spring Security 3.1. A previous article introduced security in the context of a RESTful service, using form-based authentication. This article will focus on configuration of Basic and Digest authentication and on configuring both protocols [...]
RESTful Web Service Discoverability
This is the fourth of a series of articles about setting up a secure RESTful Web Service using Spring 3.1 and Spring Security 3.1 with Java based configuration. The article will focus on Discoverability of the REST API, HATEOAS and practical scenarios driven by tests.
How to set up Integration Testing with the Maven Cargo plugin
A very common need in the lifecycle of a project is setting up integration testing. Luckily, Maven has built-in support for this exact scenario, with the following phases of the default build lifecycle (from the Maven documentation):
Introduction to Java integration testing for a RESTful API
This post will focus on basic principles and mechanics of writing Java integration tests for a RESTful API (with a JSON payload). The goal is to provide an introduction to the technologies and to write some tests for basic correctness. The examples will consume the latest version of the GitHub REST API. For an internal [...]
How to avoid brittle tests when testing the service layer
There are many ways to test the service layer of an application. The goal here is to show how to unit test this layer in isolation, by mocking out the interactions with the database entirely. This example will use Spring 3 for the dependency injection, JUnit, Hamcrest and Mockito for testing, but the technologies can [...]
Popular Posts
Archives
- April 2012 (1)
- March 2012 (1)
- February 2012 (1)
- January 2012 (2)
- December 2011 (5)
- November 2011 (3)
- October 2011 (6)
416 Followers Follow
343 Subscribers RSS FEED