@Test
public void mapShape() {

    Shape key = StringShape.builder().id("ns.foo#KeyString").build();
    Shape value = StringShape.builder().id("ns.foo#ValueString").build();
    MapShape map = MapShape.builder()
            .id("ns.foo#name")
            .key(MemberShape.builder()
                    .id("ns.foo#name$key")
                    .target(key.getId())
                    .build())
            .value(MemberShape.builder()
                    .id("ns.foo#name$value")
                    .target(value.getId())
                    .build())
            .build();
    MemberShape keyTarget = map.getKey();
    MemberShape valueTarget = map.getValue();
    Model model = Model.builder().addShape(map).addShape(key).addShape(value).build();
    NeighborVisitor neighborVisitor = new NeighborVisitor(model);
    List<Relationship> relationships = map.accept(neighborVisitor);
    assertThat(relationships, containsInAnyOrder(
            Relationship.create(map, RelationshipType.MAP_KEY, keyTarget),
            Relationship.create(map, RelationshipType.MAP_VALUE, valueTarget)));
}