public static TaskEntity getTaskEntity() {
   TaskEntity t = new TaskEntity();
   t.setName("Test Task");
   t.setDescription("Some test task");
   t.setLocale(Locale.GERMAN);
   return t;
 }
 public void deleteVariableInstanceByTask(TaskEntity task) {
   Map<String, VariableInstanceEntity> variableInstances = task.getVariableInstances();
   if (variableInstances != null) {
     for (VariableInstanceEntity variableInstance : variableInstances.values()) {
       variableInstance.delete();
     }
   }
 }