@Test
public void structureShape() {

    Shape memberShape1 = StringShape.builder().id("ns.foo#M1String").build();
    Shape memberShape2 = StringShape.builder().id("ns.foo#M2String").build();
    StructureShape struct = StructureShape.builder()
            .id("ns.foo#name")
            .addMember(MemberShape.builder()
                    .id("ns.foo#name$m1")
                    .target(memberShape1.getId())
                    .build())
            .addMember(MemberShape.builder()
                    .id("ns.foo#name$m2")
                    .target(memberShape2.getId())
                    .build())
            .build();
    MemberShape member1Target = struct.getMember("m1").get();
    MemberShape member2Target = struct.getMember("m2").get();
    Model model = Model.builder()
            .addShape(struct)
            .addShape(memberShape1)
            .addShape(memberShape2)
            .addShape(member1Target)
            .addShape(member2Target)
            .build();
    NeighborVisitor neighborVisitor = new NeighborVisitor(model);
    List<Relationship> relationships = struct.accept(neighborVisitor);
    assertThat(relationships, containsInAnyOrder(
            Relationship.create(struct, RelationshipType.STRUCTURE_MEMBER, member1Target),
            Relationship.create(struct, RelationshipType.STRUCTURE_MEMBER, member2Target)));
}