@Override
  public UnitExtension getUnitExtension(String extensionName) {

    if (extensionName.equals("CommanderExtension")) {
      return Optional.ofNullable(unitExtension).orElseGet(() -> new Commander(this));
    }

    return super.getUnitExtension(extensionName);
  }
@Test
  void getUnitExtension() {
    final var unit = new CommanderUnit("CommanderUnitName");

    assertNull(unit.getUnitExtension("SoldierExtension"));
    assertNull(unit.getUnitExtension("SergeantExtension"));
    assertNotNull(unit.getUnitExtension("CommanderExtension"));
  }