private static TileArchiveConfig.Format extractFormat(String args) {

    final Optional<TileArchiveConfig.Format> format = Stream.of(TileArchiveConfig.Format.values())
      .filter(fmt -> args.contains("--output-format=" + fmt.id()))
      .findFirst();

    if (format.isPresent()) {
      return format.get();
    } else if (args.contains("--output-format=")) {
      throw new IllegalArgumentException("unhandled output format");
    } else {
      return TileArchiveConfig.Format.MBTILES;
    }
  }
In-memory tests with fake data and profiles to ensure all features work end-to-end.
planetiler-core/src/test/java/com/onthegomap/planetiler/PlanetilerTests.java