protected Account getAccount(final UUID accountId, final TenantContext context)
      throws AnalyticsRefreshException {
    final AccountUserApi accountUserApi = getAccountUserApi();

    try {
      return accountUserApi.getAccountById(accountId, context);
    } catch (AccountApiException e) {
      logService.log(LogService.LOG_WARNING, "Error retrieving account for id " + accountId, e);
      throw new AnalyticsRefreshException(e);
    }
  }
  protected Account createAccount(final AccountData accountData) throws AccountApiException {
    final Account account = accountApi.createAccount(accountData, callContext);

    final Long accountRecordId =
        nonEntityDao.retrieveRecordIdFromObject(
            account.getId(),
            ObjectType.ACCOUNT,
            controlCacheDispatcher.getCacheController(CacheType.RECORD_ID));
    internalCallContext.setAccountRecordId(accountRecordId);
    internalCallContext.setReferenceDateTimeZone(account.getTimeZone());

    return account;
  }