### Question:
OntologySchemaProvider implements GraphElementSchemaProvider { @Override public Iterable<GraphEdgeSchema> getEdgeSchemas(String label) { return mergeEdgeSchemasWithRelationship(label, this.schemaProvider.getEdgeSchemas(label)); } @Inject  OntologySchemaProvider(Ontology ontology, GraphElementSchemaProvider schemaProvider); @Override Iterable<GraphVertexSchema> getVertexSchemas(String label); @Override Iterable<GraphEdgeSchema> getEdgeSchemas(String label); @Override Iterable<GraphEdgeSchema> getEdgeSchemas(String vertexLabelA, String label); @Override Iterable<GraphEdgeSchema> getEdgeSchemas(String vertexLabelA, Direction direction, String label); @Override Iterable<GraphEdgeSchema> getEdgeSchemas(String vertexLabelA, Direction direction, String label, String vertexLabelB); @Override Optional<GraphElementPropertySchema> getPropertySchema(String name); @Override Iterable<String> getVertexLabels(); @Override Iterable<String> getEdgeLabels(); @Override Iterable<String> getPropertyNames(); @Override Optional<String> getLabelFieldName();  }### Answer:
@Test public void getEdgeSchema() throws Exception { Ontology ontology = getOntology(); OntologySchemaProvider ontologySchemaProvider = getOntologySchemaProvider(ontology); GraphEdgeSchema edgeDragonFiresPersonSchema = Stream.ofAll(ontologySchemaProvider.getEdgeSchemas("Fire")).get(0); assertEquals(edgeDragonFiresPersonSchema.getEndB().get().getLabel().get(), "Dragon"); List<String> indices = Stream.ofAll(edgeDragonFiresPersonSchema.getIndexPartitions().get().getPartitions()).flatMap(IndexPartitions.Partition::getIndices).toJavaList(); assertEquals(2, indices.size()); assertEquals("edgeIndex1", Stream.ofAll(indices).get(0)); assertEquals("edgeIndex2", Stream.ofAll(indices).get(1)); }
@Test public void getEdgeSchemas() throws Exception { Ontology ontology = getOntology(); OntologySchemaProvider ontologySchemaProvider = getOntologySchemaProvider(ontology); Iterable<GraphEdgeSchema> edgeSchemas = ontologySchemaProvider.getEdgeSchemas("Fire"); assertEquals(Lists.newArrayList(edgeSchemas).size(), 1); }