@Test
  void testPreprocessOsmNodesAndWays() throws Exception {
    HashMap<Long, Long> nodes1 = new HashMap<>();
    Set<Long> nodes2 = new HashSet<>();
    var profile = new Profile.NullProfile() {
      @Override
      public void preprocessOsmNode(OsmElement.Node node) {
        if (node.hasTag("a", "b")) {
          nodes1.put(node.id(), node.id());
        }
      }

      @Override
      public void preprocessOsmWay(OsmElement.Way way) {
        Long featureId = nodes1.get(way.nodes().get(0));
        if (featureId != null) {
          nodes2.add(featureId);
        }
      }

      @Override
      public void processFeature(SourceFeature sourceFeature, FeatureCollector features) {
        if (sourceFeature.isPoint() && nodes2.contains(sourceFeature.id())) {
          features.point("start_nodes")
            .setMaxZoom(0);
        }
      }
    };
    var results = run(
      Map.of("threads", "1"),
      (featureGroup, p, config) -> processOsmFeatures(featureGroup, p, config, List.of(
        with(new OsmElement.Node(1, 0, 0), node -> node.setTag("a", "b")),
        new OsmElement.Node(2, GeoUtils.getWorldLat(0.375), 0),
        with(new OsmElement.Way(3), way -> {
          way.nodes().add(1, 2);
        }),
        with(new OsmElement.Way(4), way -> {
          way.nodes().add(1, 2);
        })
      )),
      profile
    );

    assertSubmap(sortListValues(Map.of(
      TileCoord.ofXYZ(0, 0, 0), List.of(
        feature(newPoint(128, 128), Map.of())
      )
    )), 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