Compact mockito: shorter answer notation

[Update 2014.10.08] The code is now on github. If you value brevity in tests like I do then maybe you would agree that mockito's doAnswer statements contain much boilerplate. That is certainly not mockito's fault but rather a result of java's inflexible syntax. When testing, i.e. GWT code one will frequently find the need to … Continue reading Compact mockito: shorter answer notation

A better eq() when matching method arguments with Mockito

I learned late of Mockito [1], even so more I love it. Walking a little farther away from the basics, a frequent needs presents itself to match method parameters (either when specifying or verifying behaviour) based on properties of complex objects which do not implement the java equals contract. Such an example would be verifying … Continue reading A better eq() when matching method arguments with Mockito