Using JMock
Here is how we can test JavaStorer using version 1.x of JMock using its JUnit 3 integration:
Here is how we can test JavaStorer using version 2.x of JMock using its JUnit 4 integration:
To make our tests a little more DSL-like, we used the following helper class with JMock 2:
Labels