Skip to main content

Tag: log4j

Unit testing a custom logger in log4j2

In this period I’m upgrading a Spring Boot project from 1.3 –> 1.5 –> 2.0. One of the steps is to get rid of log4j 1.x. In the project there is custom logger, but unfortunately its unit test with log4j2 is no more working and we receive the following error: mockito wanted but not invoked, Actually there were zero interactions with this mock Basically this exact same error in Stackoverflow.