@Test public void doesNotReplaceUnchangedShapes() { ShapeId shapeId = ShapeId.from("ns.foo#id1"); StringShape shape = StringShape.builder() .id(shapeId) .addTrait(new SensitiveTrait()) .build(); Model model = Model.builder().addShape(shape).build(); ModelTransformer transformer = ModelTransformer.create(); transformer.mapTraits(model, (s, t) -> t); }
MapTraits(BiFunction<Shape, Trait, Trait> mapper) { this.mapper = mapper; }
MapTraits { MapTraits(BiFunction<Shape, Trait, Trait> mapper) { this.mapper = mapper; } }
MapTraits { MapTraits(BiFunction<Shape, Trait, Trait> mapper) { this.mapper = mapper; } MapTraits(BiFunction<Shape, Trait, Trait> mapper); }
MapTraits { MapTraits(BiFunction<Shape, Trait, Trait> mapper) { this.mapper = mapper; } MapTraits(BiFunction<Shape, Trait, Trait> mapper);  }
MapTraits { MapTraits(BiFunction<Shape, Trait, Trait> mapper) { this.mapper = mapper; } MapTraits(BiFunction<Shape, Trait, Trait> mapper);   }