### Question:
Neo4JClient extends Neo4JClientBase implements Client<Neo4JQuery>, TransactionBinder, Batcher { @Override protected void onPersist(EntityMetadata entityMetadata, Object entity, Object id, List<RelationHolder> rlHolders) { if (log.isDebugEnabled()) log.debug("Persisting " + entity); checkActiveTransaction(); GraphDatabaseService graphDb = getConnection(); try { Node node = mapper.getNodeFromEntity(entity, id, graphDb, entityMetadata, isUpdate); if (node != null) { MetamodelImpl metamodel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel( getPersistenceUnit()); ((Neo4JTransaction) resource).addProcessedNode(id, node); if (!rlHolders.isEmpty()) { for (RelationHolder rh : rlHolders) { EntityMetadata targetNodeMetadata = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, rh.getRelationValue().getClass()); Object targetNodeKey = PropertyAccessorHelper.getId(rh.getRelationValue(), targetNodeMetadata); Node targetNode = null; if (isEntityForNeo4J(targetNodeMetadata)) { targetNode = ((Neo4JTransaction) resource).getProcessedNode(targetNodeKey); } else { if (!isUpdate) { targetNode = mapper.createProxyNode(id, targetNodeKey, graphDb, entityMetadata, targetNodeMetadata); } } if (targetNode != null) { DynamicRelationshipType relType = DynamicRelationshipType.withName(rh.getRelationName()); Relationship relationship = node.createRelationshipTo(targetNode, relType); Object relationshipObj = rh.getRelationVia(); if (relationshipObj != null) { mapper.populateRelationshipProperties(entityMetadata, targetNodeMetadata, relationship, relationshipObj); EntityMetadata relationMetadata = KunderaMetadataManager.getEntityMetadata( kunderaMetadata, relationshipObj.getClass()); if (!isUpdate) { indexer.indexRelationship(relationMetadata, graphDb, relationship, metamodel); } else { indexer.updateRelationshipIndex(relationMetadata, graphDb, relationship, metamodel); } } } } } if (!isUpdate) { indexer.indexNode(entityMetadata, graphDb, node, metamodel); } else { indexer.updateNodeIndex(entityMetadata, graphDb, node, metamodel); } } } catch (Exception e) { log.error("Error while persisting entity " + entity + ", Caused by: ", e); throw new PersistenceException(e); } } Neo4JClient(final Neo4JClientFactory factory, Map<String, Object> puProperties, String persistenceUnit,
            final KunderaMetadata kunderaMetadata); @Override void populateClientProperties(Client client, Map<String, Object> properties); @Override Object find(Class entityClass, Object key); @Override List<E> findAll(Class<E> entityClass, String[] columnsToSelect, Object... keys); @Override List<E> find(Class<E> entityClass, Map<String, String> embeddedColumnMap); @Override void close(); @Override void delete(Object entity, Object key); @Override void persistJoinTable(JoinTableData joinTableData); @Override List<E> getColumnsById(String schemaName, String tableName, String pKeyColumnName, String columnName,
            Object pKeyColumnValue, Class columnJavaType); @Override Object[] findIdsByColumn(String schemaName, String tableName, String pKeyName, String columnName,
            Object columnValue, Class entityClazz); @Override void deleteByColumn(String schemaName, String tableName, String columnName, Object columnValue); @Override List<Object> findByRelation(String colName, Object colValue, Class entityClazz); @Override EntityReader getReader(); @Override Class<Neo4JQuery> getQueryImplementor(); @Override void addBatch(com.impetus.kundera.graph.Node node); @Override int executeBatch(); @Override void bind(TransactionResource resource); List<Object> executeLuceneQuery(EntityMetadata m, String luceneQuery); GraphDatabaseService getConnection(); @Override Generator getIdGenerator();  }### Answer:
@Test public void testOnPersist() { }