### Question:
Soldier implements SoldierExtension { @Override public void soldierReady() { LOGGER.info("[Soldier] " + unit.getName() + " is ready!"); } Soldier(SoldierUnit soldierUnit); @Override void soldierReady(); SoldierUnit getUnit();  }### Answer:
@Test void soldierReady() { Logger soldierLogger = (Logger) LoggerFactory.getLogger(Soldier.class); ListAppender<ILoggingEvent> listAppender = new ListAppender<>(); listAppender.start(); soldierLogger.addAppender(listAppender); final var soldier = new Soldier(new SoldierUnit("SoldierUnitTest")); soldier.soldierReady(); List<ILoggingEvent> logsList = listAppender.list; assertEquals("[Soldier] " + soldier.getUnit().getName() + " is ready!", logsList.get(0) .getMessage()); assertEquals(Level.INFO, logsList.get(0) .getLevel()); }