public void assertNodeTriggered(long processInstanceId, String... nodeNames) {
   List<String> names = new ArrayList<String>();
   for (String nodeName : nodeNames) {
     names.add(nodeName);
   }
   if (sessionPersistence) {
     List<NodeInstanceLog> logs = logService.findNodeInstances(processInstanceId);
     if (logs != null) {
       for (NodeInstanceLog l : logs) {
         String nodeName = l.getNodeName();
         if ((l.getType() == NodeInstanceLog.TYPE_ENTER
                 || l.getType() == NodeInstanceLog.TYPE_EXIT)
             && names.contains(nodeName)) {
           names.remove(nodeName);
         }
       }
     }
   } else {
     for (LogEvent event : inMemoryLogger.getLogEvents()) {
       if (event instanceof RuleFlowNodeLogEvent) {
         String nodeName = ((RuleFlowNodeLogEvent) event).getNodeName();
         if (names.contains(nodeName)) {
           names.remove(nodeName);
         }
       }
     }
   }
   if (!names.isEmpty()) {
     String s = names.get(0);
     for (int i = 1; i < names.size(); i++) {
       s += ", " + names.get(i);
     }
     fail("Node(s) not executed: " + s);
   }
 }
  public void assertNodeTriggered(long processInstanceId, String... nodeNames) {
    List<String> names = new ArrayList<String>();
    for (String nodeName : nodeNames) {
      names.add(nodeName);
    }
    List<NodeInstanceLog> logs = logService.findNodeInstances(processInstanceId);
    if (logs != null) {
      for (NodeInstanceLog l : logs) {
        String nodeName = l.getNodeName();
        if ((l.getType() == NodeInstanceLog.TYPE_ENTER || l.getType() == NodeInstanceLog.TYPE_EXIT)
            && names.contains(nodeName)) {
          names.remove(nodeName);
        }
      }
    }

    if (!names.isEmpty()) {
      String s = names.get(0);
      for (int i = 1; i < names.size(); i++) {
        s += ", " + names.get(i);
      }
      fail("Node(s) not executed: " + s);
    }
  }