I also had the same problem. Ignoring this, I used the following two methods:
1) Mock The Logger Using any example of the Mocking Framework Mockito, Powermockito, PowerMock, etc. Use the same mocking code in test classes where applicable
2) Save logback-test.xml (or register the configuration file for any logging structure used) in the class path and set the lower level of the log as Trace.So allow test classes to load a logger to print these instructions.
This will help in demonstrating the details of how test cases run with operator instructions.
source share