Tags » Mockito

Mockito: the world order

How about verifying the order of the mocks? Interested? I hope you are!

Let’s say that we are about to implement following user story.

User story: 596 more words


Mockito for Android

Real purpose of unit testing is to test an functionality in complete isolation from other components. At times it becomes very difficult to test the functionality because the component is tightly coupled with other application components. 341 more words

Newsletter – Week 23, 2017




Spring Boot Application with Jersey Rest End Points

Yesterday I received a requirement to create a JAVA Spring Boot Application with Jersey Rest end-points. Researching on Internet about how to overwrite the SB configuration I founded that it solves with only one dependency! 1,128 more words


Importance of given-when-then in unit tests and TDD

Create better defined, shorter and maintainable unit tests with given-when-then sections.

Recently, I’ve been writing rather about more advanced concepts related to automatic testing (mostly related to…

1,118 more words

Mocking static Logger without PowerMock

Suppose you have a class that uses a static Logger to log some error, and you would like to unit test including the message logged. One approach is to use PowerMock because the Logger is usually declared static in your class. 116 more words


How to solve: mocking chained calls

I have met this issue several times, so I decided to give the simplest solution to you. You have probably had a situation, when you need to return one object, but it demanded mocking each and every object in the middle. 88 more words

Quick Solutions