private void extendTrialByGuid(TrialInstanceUpdateDto trialInstanceUpdateDto) {

    TrialInstance trialInstance = trialInstanceDao.findByGuid(trialInstanceUpdateDto.getGuid());
    if (trialInstance == null || !trialInstanceDao.exists(trialInstance.getId())) {
      throw new CSWebApplicationException(StringDefs.GENERAL_ERROR_CODE, "GUID does not exist!");
    }
    extendSingleTrialInstanceExpiration(trialInstance, daysToExtendFromDto(trialInstanceUpdateDto));

    trialInstance.setUpdatedAt(trialInstanceUpdateDto.getUpdatedAt());
    trialInstanceDao.save(trialInstance);
    trialInstanceDao.flush();
  }