Tags » Mockito

JAVA Unit Test: Why they can "save" our life?

In the last weeks I was working on a JAVA legacy system that needs to add some new features. The contract with the client included a clause that said “the new release should raise the Test Coverage until 70% of the code”. 872 more words


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