Mockito – mocking java simpler & better
Java mocking is dominated by record-replay-verify libraries like EasyMock or jmock. Mockito offers simpler and more intuitive approach: you ask questions about interactions after execution. Using mockito, you verify what you want. Using expect-run-verify libraries you often look after irrelevant interactions. Mockito offers very natural test-drive: verification of interactions is just like plain old asserts. Syntax is similar to EasyMock, therefore you can refactor safely. Mockito doesn’t understand the notion of ‘expectation’: there is only stubbing or verifications.
Read more: http://mockito.googlecode.com






