The long-awaited final version of jMock 2 was released today. There are some big changes since version one. For example, you can now write
Cat cat = mock(Cat.class);
and then set expectations on the returned cat object itself:
checking(new Expectations() {{
one(cat).miaow();
}});
(This means that the miaow method is expected to be called exactly once on the cat object.)
This...