@Test
  void testOsmLineInRelation() throws Exception {
    record TestRelationInfo(long id, String name) implements OsmRelationInfo {}
    var results = runWithOsmElements(
      Map.of("threads", "1"),
      List.of(
        new OsmElement.Node(1, 0, 0),
        new OsmElement.Node(2, GeoUtils.getWorldLat(0.375), 0),
        new OsmElement.Node(3, GeoUtils.getWorldLat(0.25), 0),
        new OsmElement.Node(4, GeoUtils.getWorldLat(0.125), 0),
        with(new OsmElement.Way(5), way -> {
          way.setTag("attr", "value1");
          way.nodes().add(1, 2);
        }),
        with(new OsmElement.Way(6), way -> {
          way.setTag("attr", "value2");
          way.nodes().add(3, 4);
        }),
        with(new OsmElement.Relation(6), rel -> {
          rel.setTag("name", "relation name");
          rel.members().add(new OsmElement.Relation.Member(OsmElement.Type.WAY, 6, "role"));
        })
      ),
      (relation) -> {
        if (relation.hasTag("name", "relation name")) {
          return List.of(new TestRelationInfo(relation.id(), relation.getString("name")));
        }
        return null;
      }, (in, features) -> {
        var relationInfos = in.relationInfo(TestRelationInfo.class);
        var firstRelation = relationInfos.stream().findFirst();
        if (in.canBeLine()) {
          features.line("layer")
            .setZoomRange(0, 0)
            .setAttr("relname", firstRelation.map(d -> d.relation().name).orElse(null))
            .inheritAttrFromSource("attr")
            .setAttr("relrole", firstRelation.map(OsmReader.RelationMember::role).orElse(null));
        }
      }
    );

    assertSubmap(sortListValues(Map.of(
      TileCoord.ofXYZ(0, 0, 0), List.of(
        feature(newLineString(128, 128, 128, 0.375 * 256), Map.of(
          "attr", "value1"
        )),
        feature(newLineString(128, 0.25 * 256, 128, 0.125 * 256), Map.of(
          "attr", "value2",
          "relname", "relation name",
          "relrole", "role"
        ))
      )
    )), 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