@Test public void throwsWhenMapperChangesShapeId() { Assertions.assertThrows(RuntimeException.class, () -> { ShapeId shapeId = ShapeId.from("ns.foo#id1"); StringShape shape = StringShape.builder().id(shapeId).build(); Model model = Model.builder().addShape(shape).build(); ModelTransformer transformer = ModelTransformer.create(); transformer.mapShapes(model, (s -> Shape.shapeToBuilder(s).id("ns.foo#change").build())); }); }
MapShapes(Function<Shape, Shape> mapper) { this.mapper = mapper; }
MapShapes { MapShapes(Function<Shape, Shape> mapper) { this.mapper = mapper; } }
MapShapes { MapShapes(Function<Shape, Shape> mapper) { this.mapper = mapper; } MapShapes(Function<Shape, Shape> mapper); }
MapShapes { MapShapes(Function<Shape, Shape> mapper) { this.mapper = mapper; } MapShapes(Function<Shape, Shape> mapper);  }
MapShapes { MapShapes(Function<Shape, Shape> mapper) { this.mapper = mapper; } MapShapes(Function<Shape, Shape> mapper);   }