@Test
public void serviceShape() {

    ServiceShape service = ServiceShape.builder()
            .id("ns.foo#Svc")
            .version("2017-01-17")
            .addOperation("ns.foo#Operation")
            .addResource("ns.foo#Resource")
            .build();
    OperationShape operationShape = OperationShape.builder().id("ns.foo#Operation").build();
    ResourceShape resourceShape = ResourceShape.builder().id("ns.foo#Resource").build();
    Model model = Model.builder()
            .addShapes(service, resourceShape, operationShape)
            .build();
    NeighborVisitor neighborVisitor = new NeighborVisitor(model);
    List<Relationship> relationships = service.accept(neighborVisitor);
    assertThat(relationships, containsInAnyOrder(
            Relationship.create(service, RelationshipType.RESOURCE, resourceShape),
            Relationship.create(service, RelationshipType.OPERATION, operationShape),
            Relationship.create(resourceShape, RelationshipType.BOUND, service),
            Relationship.create(operationShape, RelationshipType.BOUND, service)));
}