caseService
.withCaseExecution(caseExecutionId)
.disable();
// then
CaseExecution caseExecution = caseExecutionQuery.singleResult();
// the human task is disabled
assertTrue(caseExecution.isDisabled());
assertFalse(caseExecution.isActive());
assertFalse(caseExecution.isEnabled());
}