docs: protected int getNextVersion(DeploymentEntity deployment, DefinitionEntity newDefinition, DefinitionEntity latestDefinition) {
      int result = 1;
      if (latestDefinition != null) {
        int latestVersion = latestDefinition.getVersion();
        result = latestVersion + 1;
      }
      return result;
    }