Adding a test-driven implementation of the State design pattern