Test Driven Development example in Java