@Test
  public void testLogger3() {
    long processInstanceId = startProcess("com.sample.ruleflow2").getId();

    logger.debug("Checking process instances for process 'com.sample.ruleflow2'");
    List<ProcessInstanceLog> processInstances =
        logService.findProcessInstances("com.sample.ruleflow2");
    assertEquals(1, processInstances.size());
    ProcessInstanceLog processInstance = processInstances.get(0);
    logger.debug("{}", processInstance);
    logger.debug(" -> {} - {} ", processInstance.getStart(), processInstance.getEnd());
    assertNotNull(processInstance.getStart());
    assertNotNull(processInstance.getEnd());
    assertEquals(processInstanceId, processInstance.getProcessInstanceId().longValue());
    assertEquals("com.sample.ruleflow2", processInstance.getProcessId());
    List<NodeInstanceLog> nodeInstances = logService.findNodeInstances(processInstanceId);
    for (NodeInstanceLog nodeInstance : nodeInstances) {
      logger.debug("{}", nodeInstance);
      logger.debug(" -> {}", nodeInstance.getDate());
      assertEquals(processInstanceId, processInstance.getProcessInstanceId().longValue());
      assertEquals("com.sample.ruleflow2", processInstance.getProcessId());
      assertNotNull(nodeInstance.getDate());
    }
    assertEquals(14, nodeInstances.size());
    logService.clear();
  }
  @Test
  public void testLogger2() {
    // start process instance
    startProcess("com.sample.ruleflow");
    startProcess("com.sample.ruleflow");

    logger.debug("Checking process instances for process 'com.sample.ruleflow'");
    List<ProcessInstanceLog> processInstances =
        logService.findProcessInstances("com.sample.ruleflow");
    assertEquals(2, processInstances.size());
    for (ProcessInstanceLog processInstance : processInstances) {
      logger.debug("{}", processInstance);
      logger.debug(" -> {} - {}", processInstance.getStart(), processInstance.getEnd());
      List<NodeInstanceLog> nodeInstances =
          logService.findNodeInstances(processInstance.getProcessInstanceId());
      for (NodeInstanceLog nodeInstance : nodeInstances) {
        logger.debug("{}", nodeInstance);
        logger.debug(" -> {}", nodeInstance.getDate());
      }
      assertEquals(6, nodeInstances.size());
    }
    logService.clear();
  }