@Test
public void operationShape() {

    StructureShape error = StructureShape.builder().id("ns.foo#Error").build();
    StructureShape input = StructureShape.builder().id("ns.foo#Input").build();
    StructureShape output = StructureShape.builder().id("ns.foo#Output").build();
    OperationShape method = OperationShape.builder()
            .id("ns.foo#Foo")
            .input(input.getId())
            .output(output.getId())
            .addError(error.getId())
            .build();
    Model model = Model.builder().addShapes(method, input, output, error).build();
    NeighborVisitor neighborVisitor = new NeighborVisitor(model);
    List<Relationship> relationships = method.accept(neighborVisitor);
    assertThat(relationships, containsInAnyOrder(
            Relationship.create(method, RelationshipType.INPUT, input),
            Relationship.create(method, RelationshipType.OUTPUT, output),
            Relationship.create(method, RelationshipType.ERROR, error)));
}