@Test
  void testPlanetilerRunnerShapefile() throws Exception {
    Path mbtiles = tempDir.resolve("output.mbtiles");
    Path resourceDir = TestUtils.pathToResource("");

    Planetiler.create(Arguments.fromArgs("--tmpdir=" + tempDir.resolve("data")))
      .setProfile(new Profile.NullProfile() {
        @Override
        public void processFeature(SourceFeature source, FeatureCollector features) {
          features.point("stations")
            .setZoomRange(0, 14)
            .setAttr("source", source.getSource())
            .setAttr("layer", source.getSourceLayer());
        }
      })
      // Match *.shp within [shapefile.zip, shapefile-copy.zip]
      .addShapefileGlobSource("shapefile-glob", resourceDir, "shape*.zip")
      // Match *.shp within shapefile.zip
      .addShapefileGlobSource("shapefile-glob-zip", resourceDir.resolve("shapefile.zip"), "*.shp")
      // Match *.shp within shapefile.zip
      .addShapefileSource("shapefile", resourceDir.resolve("shapefile.zip"))
      .setOutput(mbtiles)
      .run();

    try (Mbtiles db = Mbtiles.newReadOnlyDatabase(mbtiles)) {
      long fileCount = 0, globCount = 0, globZipCount = 0;
      var tileMap = TestUtils.getTileMap(db);
      for (var tile : tileMap.values()) {
        for (var feature : tile) {
          feature.geometry().validate();
          assertEquals("stations", feature.attrs().get("layer"));
          switch ((String) feature.attrs().get("source")) {
            case "shapefile" -> fileCount++;
            case "shapefile-glob" -> globCount++;
            case "shapefile-glob-zip" -> globZipCount++;
          }
        }
      }

      assertTrue(fileCount > 0);
      // `shapefile` and `shapefile-glob-zip` both match only one file.
      assertEquals(fileCount, globZipCount);
      // `shapefile-glob` matches two input files, should have 2x number of features of `shapefile`.
      assertEquals(2 * fileCount, globCount);
    }
  }
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