mock-static

Don’t mock static: test SLF4J Logger with appenders

Most of the time you would like to inject dependencies to your class directly – through the class constructor or by setting required properties via setters. No matter what programming style you prefer you may encounter situation when some dependency cannot or shouldn’t be passed directly to your system under test. Good example of that …

Don’t mock static: test SLF4J Logger with appenders Read More »