OPI Blog
Learn from experts in their fields

Browsing Tags: mockito

Nov 7, 2013
Testing GWT with GwtMockito
Introduction This article shows how to use Mockito’s doAnswer() and thenAnswer() to test hard to reach code usually written within a GWT application. The technique of calling anonymous inner classes from test code applies to ...
How to Mock Final Classes in Unit Tests
Mocking has become a key component to writing effective unit-tests. It is a very useful strategy to write focused tests. Mocking frameworks make it easy to write test, but they have their limitations. Both Mockito ...
Write Readable Tests with Mockito
A good mocking framework is a must have in any Java developers toolset. Mocking frameworks greatly reduce the amount of code needed to effectively mock dependent interfaces and/or classes. Over the past several years EasyMock ...