Test log4j2 with JUnit using a custom appender

https://www.dontpanicblog.co.uk/2018/04/29/test-log4j2-with-junit/