private void verifyEntityProperties(
     Vertex entityVertex, String entityName, RelationshipType entityType) {
   Assert.assertEquals(entityName, entityVertex.getProperty(RelationshipProperty.NAME.getName()));
   Assert.assertEquals(
       entityType.getName(), entityVertex.getProperty(RelationshipProperty.TYPE.getName()));
   Assert.assertNotNull(entityVertex.getProperty(RelationshipProperty.TIMESTAMP.getName()));
 }
  /**
   * This unfortunately requires a handle to Titan implementation since
   * com.tinkerpop.blueprints.KeyIndexableGraph#createKeyIndex does not create an index.
   */
  protected void createIndicesForVertexKeys() {
    if (!((KeyIndexableGraph) graph).getIndexedKeys(Vertex.class).isEmpty()) {
      LOG.info("Indexes already exist for graph");
      return;
    }

    LOG.info("Indexes does not exist, Creating indexes for graph");
    // todo - externalize this
    makeNameKeyIndex();
    makeKeyIndex(RelationshipProperty.TYPE.getName());
    makeKeyIndex(RelationshipProperty.TIMESTAMP.getName());
    makeKeyIndex(RelationshipProperty.VERSION.getName());
    makeInstanceIndex();
  }
  private void verifyLineageGraphForReplicationOrEviction(
      String feedName,
      String feedInstanceDataPath,
      WorkflowExecutionContext context,
      RelationshipLabel edgeLabel)
      throws Exception {
    String feedInstanceName =
        InstanceRelationshipGraphBuilder.getFeedInstanceName(
            feedName,
            context.getClusterName(),
            feedInstanceDataPath,
            context.getNominalTimeAsISO8601());
    Vertex feedVertex = getEntityVertex(feedInstanceName, RelationshipType.FEED_INSTANCE);

    Edge edge = feedVertex.getEdges(Direction.OUT, edgeLabel.getName()).iterator().next();
    Assert.assertNotNull(edge);
    Assert.assertEquals(
        edge.getProperty(RelationshipProperty.TIMESTAMP.getName()),
        context.getTimeStampAsISO8601());

    Vertex clusterVertex = edge.getVertex(Direction.IN);
    Assert.assertEquals(
        clusterVertex.getProperty(RelationshipProperty.NAME.getName()), context.getClusterName());
  }