@Test
 @Deployment(resources = {"chapter4/bookorder.bpmn20.xml"})
 public void queryHistoricVariableUpdates() {
   startAndComplete();
   HistoryService historyService = activitiRule.getHistoryService();
   List<HistoricDetail> historicVariableUpdateList =
       historyService.createHistoricDetailQuery().variableUpdates().list();
   assertNotNull(historicVariableUpdateList);
   assertEquals(3, historicVariableUpdateList.size());
   for (HistoricDetail historicDetail : historicVariableUpdateList) {
     assertTrue(historicDetail instanceof HistoricVariableUpdate);
     HistoricVariableUpdate historicVariableUpdate = (HistoricVariableUpdate) historicDetail;
     assertNotNull(historicVariableUpdate.getExecutionId());
     System.out.println(
         "historic variable update, revision "
             + historicVariableUpdate.getRevision()
             + ", variable type name "
             + historicVariableUpdate.getVariableTypeName()
             + ", variable name "
             + historicVariableUpdate.getVariableName()
             + ", Variable value '"
             + historicVariableUpdate.getValue()
             + "'");
   }
 }