@Test
  void testOsmProfileFinish() throws Exception {
    double y = 0.5 + Z14_WIDTH / 2;
    double lat = GeoUtils.getWorldLat(y);

    double x1 = 0.5 + Z14_WIDTH / 4;
    double lng1 = GeoUtils.getWorldLon(x1);
    double lng2 = GeoUtils.getWorldLon(x1 + Z14_WIDTH * 10d / 256);

    var results = runWithOsmElements(
      Map.of("threads", "1"),
      List.of(
        with(new OsmElement.Node(1, lat, lng1), t -> t.setTag("a", 1)),
        with(new OsmElement.Node(2, lat, lng2), t -> t.setTag("a", 3))
      ),
      new Profile.NullProfile() {
        private final List<SourceFeature> featureList = new CopyOnWriteArrayList<>();

        @Override
        public void processFeature(SourceFeature in, FeatureCollector features) {
          featureList.add(in);
        }

        @Override
        public void finish(String name, FeatureCollector.Factory featureCollectors,
          Consumer<FeatureCollector.Feature> next) {
          if ("osm".equals(name)) {
            for (SourceFeature in : featureList) {
              var features = featureCollectors.get(in);
              features.point("layer")
                .setZoomRange(13, 14)
                .inheritAttrFromSource("a");
              for (var feature : features) {
                next.accept(feature);
              }
            }
          }
        }
      }
    );

    assertSubmap(sortListValues(Map.of(
      TileCoord.ofXYZ(Z14_TILES / 2, Z14_TILES / 2, 14), List.of(
        feature(newPoint(64, 128), Map.of("a", 1L)),
        feature(newPoint(74, 128), Map.of("a", 3L))
      ),
      TileCoord.ofXYZ(Z13_TILES / 2, Z13_TILES / 2, 13), List.of(
        // merge 32->37 and 37->42 since they have same attrs
        feature(newPoint(32, 64), Map.of("a", 1L)),
        feature(newPoint(37, 64), Map.of("a", 3L))
      )
    )), sortListValues(results.tiles));
  }
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