@Test
  void testMultipleFeaturesMultipleLayer() {
    Point point = JTS_FACTORY.createPoint(new CoordinateXY(0, 0));
    Map<String, Object> attrs1 = Map.of("a", 1L, "b", 2L);
    Map<String, Object> attrs2 = Map.of("b", 3L, "c", 2L);
    byte[] encoded = new VectorTile().addLayerFeatures("layer1", List.of(
      new VectorTile.Feature("layer1", 1L, VectorTile.encodeGeometry(point), attrs1),
      new VectorTile.Feature("layer1", 2L, VectorTile.encodeGeometry(point), attrs2)
    )).addLayerFeatures("layer2", List.of(
      new VectorTile.Feature("layer2", 3L, VectorTile.encodeGeometry(point), attrs1)
    )).encode();

    List<VectorTile.Feature> decoded = VectorTile.decode(encoded);
    assertEquals(attrs1, decoded.get(0).tags());
    assertEquals("layer1", decoded.get(0).layer());

    assertEquals(attrs2, decoded.get(1).tags());
    assertEquals("layer1", decoded.get(1).layer());

    assertEquals(attrs1, decoded.get(2).tags());
    assertEquals("layer2", decoded.get(2).layer());
  }
This class is copied from
https://github.com/ElectronicChartCentre/java-vector-tile/blob/master/src/test/java/no/ecc/vectortile/VectorTileEncoderTest.java
and modified based on the changes in VectorTileEncoder, and adapted to junit 5.
planetiler-core/src/test/java/com/onthegomap/planetiler/VectorTileTest.java