SchemaEntityDefinition extends SchemaElementDefinition { public String getVertex() { return getIdentifierTypeName(IdentifierType.VERTEX); }  String getVertex(); @JsonIgnore @Override SchemaEntityDefinition getExpandedDefinition();  }
@Test public void shouldBuildEntityDefinition() { final SchemaEntityDefinition elementDef = createBuilder().build(); setupSchema(elementDef); assertEquals(1, elementDef.getIdentifiers().size()); assertEquals("id.integer", elementDef.getVertex()); }
@Test public void shouldOverrideVertexWhenMerging() { final SchemaEntityDefinition elementDef1 = new SchemaEntityDefinition.Builder() .vertex("vertex.integer") .build(); final SchemaEntityDefinition elementDef2 = new SchemaEntityDefinition.Builder() .vertex("vertex.string") .build(); final SchemaEntityDefinition mergedDef = new SchemaEntityDefinition.Builder() .merge(elementDef1) .merge(elementDef2) .build(); assertEquals("vertex.string", mergedDef.getVertex()); }