### Question:
Sergeant implements SergeantExtension { @Override public void sergeantReady() { LOGGER.info("[Sergeant] " + unit.getName() + " is ready!"); } Sergeant(SergeantUnit sergeantUnit); @Override void sergeantReady(); SergeantUnit getUnit();  }### Answer:
@Test void sergeantReady() { Logger sergeantLogger = (Logger) LoggerFactory.getLogger(Sergeant.class); ListAppender<ILoggingEvent> listAppender = new ListAppender<>(); listAppender.start(); sergeantLogger.addAppender(listAppender); final var sergeant = new Sergeant(new SergeantUnit("SergeantUnitTest")); sergeant.sergeantReady(); List<ILoggingEvent> logsList = listAppender.list; assertEquals("[Sergeant] " + sergeant.getUnit().getName() + " is ready!", logsList.get(0) .getMessage()); assertEquals(Level.INFO, logsList.get(0) .getLevel()); }