Code review comment: Are there cases where we can just retry instead of throwing an exception here ? Throwing  here usually means a runner-initiated retry which should should be correct could be limited (for example fail the job after four retries) and might not use exponential backoff.

Code under review:
private void executeCypherUnwindStatement() {
      
      
      
      
      if (elementsInput == 0) {
        return;
      }

      
      
      
      final Map<String, Object> parametersMap = new HashMap<>();
      parametersMap.put(unwindMapName, unwindList);

      
      
      
      TransactionWork<Void> transactionWork =
          transaction -> {
            Result result = transaction.run(cypher, parametersMap);
            while (result.hasNext()) {
              
              
              
              result.next();
            }
            return null;
          };

      if (logCypher && !loggingDone) {
        String parametersString = getParametersString(parametersMap);
        LOG.info(
            "Starting a write transaction for unwind statement cypher: "
                + cypher
                + ", parameters: "
                + parametersString);
        loggingDone = true;
      }

      if (driverSession.session == null) {
        throw new RuntimeException("neo4j session was not initialized correctly");
      } else {
        try {
          driverSession.session.writeTransaction(transactionWork, transactionConfig);
        } catch (Exception e) {
          throw new RuntimeException(
              "Error writing " + unwindList.size() + " rows to Neo4j with Cypher: " + cypher, e);
        }
      }

      
      
      unwindList.clear();
      elementsInput = 0;
    }

Line commented on: throw new RuntimeException("neo4j session was not initialized correctly");

Revised code:
private void executeCypherUnwindStatement() {
      
      
      
      
      if (elementsInput == 0) {
        return;
      }

      
      
      
      final Map<String, Object> parametersMap = new HashMap<>();
      parametersMap.put(unwindMapName, unwindList);

      
      
      
      TransactionWork<Void> transactionWork =
          transaction -> {
            Result result = transaction.run(cypher, parametersMap);
            while (result.hasNext()) {
              
              
              
              result.next();
            }
            return null;
          };

      if (logCypher && !loggingDone) {
        String parametersString = getParametersString(parametersMap);
        LOG.info(
            "Starting a write transaction for unwind statement cypher: "
                + cypher
                + ", parameters: "
                + parametersString);
        loggingDone = true;
      }

      if (driverSession.session == null) {
        throw new RuntimeException("neo4j session was not initialized correctly");
      } else {
        try {
          driverSession.session.writeTransaction(transactionWork, transactionConfig);
        } catch (Exception e) {
          throw new RuntimeException(
              "Error writing " + unwindList.size() + " rows to Neo4j with Cypher: " + cypher, e);
        }
      }

      
      
      unwindList.clear();
      elementsInput = 0;
    }