@Test
public void addMemberWithConsumer() {

    StructureShape shape = StructureShape.builder()
            .id("ns.foo#bar")
            .addMember("foo", ShapeId.from("ns.foo#bam"), builder -> builder.addTrait(new SensitiveTrait()))
            .build();
    assertEquals(shape.getMember("foo").get(),
                 MemberShape.builder()
                         .id(shape.getId().withMember("foo"))
                         .target("ns.foo#bam")
                         .addTrait(new SensitiveTrait())
                         .build());
}