// Code generated by lark_sdk_gen. DO NOT EDIT.
/**
 * Copyright 2022 chyroc
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package test

import (
	"context"
	"fmt"
	"testing"

	"github.com/stretchr/testify/assert"

	"github.com/chyroc/lark"
)

func Test_Calendar_Sample_Failed(t *testing.T) {
	as := assert.New(t)

	t.Run("request failed", func(t *testing.T) {
		cli := AppAllPermission.Ins()
		cli.Mock().MockGetTenantAccessToken(mockGetTenantAccessTokenFailed)
		cli.Mock().MockGetAppAccessToken(mockGetTenantAccessTokenFailed)
		moduleCli := cli.Calendar

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.CreateCalendarACL(ctx, &lark.CreateCalendarACLReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "failed")
		})

	})

	t.Run("request mock failed", func(t *testing.T) {
		cli := AppAllPermission.Ins()
		moduleCli := cli.Calendar

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarCreateCalendarACL(func(ctx context.Context, request *lark.CreateCalendarACLReq, options ...lark.MethodOptionFunc) (*lark.CreateCalendarACLResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarCreateCalendarACL()

			_, _, err := moduleCli.CreateCalendarACL(ctx, &lark.CreateCalendarACLReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarDeleteCalendarACL(func(ctx context.Context, request *lark.DeleteCalendarACLReq, options ...lark.MethodOptionFunc) (*lark.DeleteCalendarACLResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarDeleteCalendarACL()

			_, _, err := moduleCli.DeleteCalendarACL(ctx, &lark.DeleteCalendarACLReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarGetCalendarACLList(func(ctx context.Context, request *lark.GetCalendarACLListReq, options ...lark.MethodOptionFunc) (*lark.GetCalendarACLListResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarGetCalendarACLList()

			_, _, err := moduleCli.GetCalendarACLList(ctx, &lark.GetCalendarACLListReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarSubscribeCalendarACL(func(ctx context.Context, request *lark.SubscribeCalendarACLReq, options ...lark.MethodOptionFunc) (*lark.SubscribeCalendarACLResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarSubscribeCalendarACL()

			_, _, err := moduleCli.SubscribeCalendarACL(ctx, &lark.SubscribeCalendarACLReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarUnsubscribeCalendarACL(func(ctx context.Context, request *lark.UnsubscribeCalendarACLReq, options ...lark.MethodOptionFunc) (*lark.UnsubscribeCalendarACLResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarUnsubscribeCalendarACL()

			_, _, err := moduleCli.UnsubscribeCalendarACL(ctx, &lark.UnsubscribeCalendarACLReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarGetPrimaryCalendar(func(ctx context.Context, request *lark.GetPrimaryCalendarReq, options ...lark.MethodOptionFunc) (*lark.GetPrimaryCalendarResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarGetPrimaryCalendar()

			_, _, err := moduleCli.GetPrimaryCalendar(ctx, &lark.GetPrimaryCalendarReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarCreateCalendar(func(ctx context.Context, request *lark.CreateCalendarReq, options ...lark.MethodOptionFunc) (*lark.CreateCalendarResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarCreateCalendar()

			_, _, err := moduleCli.CreateCalendar(ctx, &lark.CreateCalendarReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarDeleteCalendar(func(ctx context.Context, request *lark.DeleteCalendarReq, options ...lark.MethodOptionFunc) (*lark.DeleteCalendarResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarDeleteCalendar()

			_, _, err := moduleCli.DeleteCalendar(ctx, &lark.DeleteCalendarReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarGetCalendar(func(ctx context.Context, request *lark.GetCalendarReq, options ...lark.MethodOptionFunc) (*lark.GetCalendarResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarGetCalendar()

			_, _, err := moduleCli.GetCalendar(ctx, &lark.GetCalendarReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarGetCalendarList(func(ctx context.Context, request *lark.GetCalendarListReq, options ...lark.MethodOptionFunc) (*lark.GetCalendarListResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarGetCalendarList()

			_, _, err := moduleCli.GetCalendarList(ctx, &lark.GetCalendarListReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarUpdateCalendar(func(ctx context.Context, request *lark.UpdateCalendarReq, options ...lark.MethodOptionFunc) (*lark.UpdateCalendarResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarUpdateCalendar()

			_, _, err := moduleCli.UpdateCalendar(ctx, &lark.UpdateCalendarReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarSearchCalendar(func(ctx context.Context, request *lark.SearchCalendarReq, options ...lark.MethodOptionFunc) (*lark.SearchCalendarResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarSearchCalendar()

			_, _, err := moduleCli.SearchCalendar(ctx, &lark.SearchCalendarReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarSubscribeCalendar(func(ctx context.Context, request *lark.SubscribeCalendarReq, options ...lark.MethodOptionFunc) (*lark.SubscribeCalendarResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarSubscribeCalendar()

			_, _, err := moduleCli.SubscribeCalendar(ctx, &lark.SubscribeCalendarReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarUnsubscribeCalendar(func(ctx context.Context, request *lark.UnsubscribeCalendarReq, options ...lark.MethodOptionFunc) (*lark.UnsubscribeCalendarResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarUnsubscribeCalendar()

			_, _, err := moduleCli.UnsubscribeCalendar(ctx, &lark.UnsubscribeCalendarReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarSubscribeCalendarChangeEvent(func(ctx context.Context, request *lark.SubscribeCalendarChangeEventReq, options ...lark.MethodOptionFunc) (*lark.SubscribeCalendarChangeEventResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarSubscribeCalendarChangeEvent()

			_, _, err := moduleCli.SubscribeCalendarChangeEvent(ctx, &lark.SubscribeCalendarChangeEventReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarUnsubscribeCalendarChangeEvent(func(ctx context.Context, request *lark.UnsubscribeCalendarChangeEventReq, options ...lark.MethodOptionFunc) (*lark.UnsubscribeCalendarChangeEventResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarUnsubscribeCalendarChangeEvent()

			_, _, err := moduleCli.UnsubscribeCalendarChangeEvent(ctx, &lark.UnsubscribeCalendarChangeEventReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarCreateCalendarEvent(func(ctx context.Context, request *lark.CreateCalendarEventReq, options ...lark.MethodOptionFunc) (*lark.CreateCalendarEventResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarCreateCalendarEvent()

			_, _, err := moduleCli.CreateCalendarEvent(ctx, &lark.CreateCalendarEventReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarDeleteCalendarEvent(func(ctx context.Context, request *lark.DeleteCalendarEventReq, options ...lark.MethodOptionFunc) (*lark.DeleteCalendarEventResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarDeleteCalendarEvent()

			_, _, err := moduleCli.DeleteCalendarEvent(ctx, &lark.DeleteCalendarEventReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarGetCalendarEvent(func(ctx context.Context, request *lark.GetCalendarEventReq, options ...lark.MethodOptionFunc) (*lark.GetCalendarEventResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarGetCalendarEvent()

			_, _, err := moduleCli.GetCalendarEvent(ctx, &lark.GetCalendarEventReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarGetCalendarEventList(func(ctx context.Context, request *lark.GetCalendarEventListReq, options ...lark.MethodOptionFunc) (*lark.GetCalendarEventListResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarGetCalendarEventList()

			_, _, err := moduleCli.GetCalendarEventList(ctx, &lark.GetCalendarEventListReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarUpdateCalendarEvent(func(ctx context.Context, request *lark.UpdateCalendarEventReq, options ...lark.MethodOptionFunc) (*lark.UpdateCalendarEventResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarUpdateCalendarEvent()

			_, _, err := moduleCli.UpdateCalendarEvent(ctx, &lark.UpdateCalendarEventReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarSearchCalendarEvent(func(ctx context.Context, request *lark.SearchCalendarEventReq, options ...lark.MethodOptionFunc) (*lark.SearchCalendarEventResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarSearchCalendarEvent()

			_, _, err := moduleCli.SearchCalendarEvent(ctx, &lark.SearchCalendarEventReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarSubscribeCalendarEvent(func(ctx context.Context, request *lark.SubscribeCalendarEventReq, options ...lark.MethodOptionFunc) (*lark.SubscribeCalendarEventResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarSubscribeCalendarEvent()

			_, _, err := moduleCli.SubscribeCalendarEvent(ctx, &lark.SubscribeCalendarEventReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarUnsubscribeCalendarEvent(func(ctx context.Context, request *lark.UnsubscribeCalendarEventReq, options ...lark.MethodOptionFunc) (*lark.UnsubscribeCalendarEventResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarUnsubscribeCalendarEvent()

			_, _, err := moduleCli.UnsubscribeCalendarEvent(ctx, &lark.UnsubscribeCalendarEventReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarReplyCalendarEvent(func(ctx context.Context, request *lark.ReplyCalendarEventReq, options ...lark.MethodOptionFunc) (*lark.ReplyCalendarEventResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarReplyCalendarEvent()

			_, _, err := moduleCli.ReplyCalendarEvent(ctx, &lark.ReplyCalendarEventReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarGetCalendarEventInstanceList(func(ctx context.Context, request *lark.GetCalendarEventInstanceListReq, options ...lark.MethodOptionFunc) (*lark.GetCalendarEventInstanceListResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarGetCalendarEventInstanceList()

			_, _, err := moduleCli.GetCalendarEventInstanceList(ctx, &lark.GetCalendarEventInstanceListReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarGetCalendarEventInstanceViewList(func(ctx context.Context, request *lark.GetCalendarEventInstanceViewListReq, options ...lark.MethodOptionFunc) (*lark.GetCalendarEventInstanceViewListResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarGetCalendarEventInstanceViewList()

			_, _, err := moduleCli.GetCalendarEventInstanceViewList(ctx, &lark.GetCalendarEventInstanceViewListReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarDeleteCalendarEventMeetingChat(func(ctx context.Context, request *lark.DeleteCalendarEventMeetingChatReq, options ...lark.MethodOptionFunc) (*lark.DeleteCalendarEventMeetingChatResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarDeleteCalendarEventMeetingChat()

			_, _, err := moduleCli.DeleteCalendarEventMeetingChat(ctx, &lark.DeleteCalendarEventMeetingChatReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarCreateCalendarEventMeetingChat(func(ctx context.Context, request *lark.CreateCalendarEventMeetingChatReq, options ...lark.MethodOptionFunc) (*lark.CreateCalendarEventMeetingChatResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarCreateCalendarEventMeetingChat()

			_, _, err := moduleCli.CreateCalendarEventMeetingChat(ctx, &lark.CreateCalendarEventMeetingChatReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarCreateCalendarTimeoffEvent(func(ctx context.Context, request *lark.CreateCalendarTimeoffEventReq, options ...lark.MethodOptionFunc) (*lark.CreateCalendarTimeoffEventResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarCreateCalendarTimeoffEvent()

			_, _, err := moduleCli.CreateCalendarTimeoffEvent(ctx, &lark.CreateCalendarTimeoffEventReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarDeleteCalendarTimeoffEvent(func(ctx context.Context, request *lark.DeleteCalendarTimeoffEventReq, options ...lark.MethodOptionFunc) (*lark.DeleteCalendarTimeoffEventResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarDeleteCalendarTimeoffEvent()

			_, _, err := moduleCli.DeleteCalendarTimeoffEvent(ctx, &lark.DeleteCalendarTimeoffEventReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarBatchGetCalendarMeetingRoomSummary(func(ctx context.Context, request *lark.BatchGetCalendarMeetingRoomSummaryReq, options ...lark.MethodOptionFunc) (*lark.BatchGetCalendarMeetingRoomSummaryResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarBatchGetCalendarMeetingRoomSummary()

			_, _, err := moduleCli.BatchGetCalendarMeetingRoomSummary(ctx, &lark.BatchGetCalendarMeetingRoomSummaryReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarBatchGetCalendarMeetingRoomFreebusy(func(ctx context.Context, request *lark.BatchGetCalendarMeetingRoomFreebusyReq, options ...lark.MethodOptionFunc) (*lark.BatchGetCalendarMeetingRoomFreebusyResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarBatchGetCalendarMeetingRoomFreebusy()

			_, _, err := moduleCli.BatchGetCalendarMeetingRoomFreebusy(ctx, &lark.BatchGetCalendarMeetingRoomFreebusyReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarReplyCalendarMeetingRoomInstance(func(ctx context.Context, request *lark.ReplyCalendarMeetingRoomInstanceReq, options ...lark.MethodOptionFunc) (*lark.ReplyCalendarMeetingRoomInstanceResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarReplyCalendarMeetingRoomInstance()

			_, _, err := moduleCli.ReplyCalendarMeetingRoomInstance(ctx, &lark.ReplyCalendarMeetingRoomInstanceReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarCreateCalendarEventAttendee(func(ctx context.Context, request *lark.CreateCalendarEventAttendeeReq, options ...lark.MethodOptionFunc) (*lark.CreateCalendarEventAttendeeResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarCreateCalendarEventAttendee()

			_, _, err := moduleCli.CreateCalendarEventAttendee(ctx, &lark.CreateCalendarEventAttendeeReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarDeleteCalendarEventAttendee(func(ctx context.Context, request *lark.DeleteCalendarEventAttendeeReq, options ...lark.MethodOptionFunc) (*lark.DeleteCalendarEventAttendeeResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarDeleteCalendarEventAttendee()

			_, _, err := moduleCli.DeleteCalendarEventAttendee(ctx, &lark.DeleteCalendarEventAttendeeReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarGetCalendarEventAttendeeList(func(ctx context.Context, request *lark.GetCalendarEventAttendeeListReq, options ...lark.MethodOptionFunc) (*lark.GetCalendarEventAttendeeListResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarGetCalendarEventAttendeeList()

			_, _, err := moduleCli.GetCalendarEventAttendeeList(ctx, &lark.GetCalendarEventAttendeeListReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarGetCalendarEventAttendeeChatMemberList(func(ctx context.Context, request *lark.GetCalendarEventAttendeeChatMemberListReq, options ...lark.MethodOptionFunc) (*lark.GetCalendarEventAttendeeChatMemberListResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarGetCalendarEventAttendeeChatMemberList()

			_, _, err := moduleCli.GetCalendarEventAttendeeChatMemberList(ctx, &lark.GetCalendarEventAttendeeChatMemberListReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarGetCalendarFreeBusyList(func(ctx context.Context, request *lark.GetCalendarFreeBusyListReq, options ...lark.MethodOptionFunc) (*lark.GetCalendarFreeBusyListResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarGetCalendarFreeBusyList()

			_, _, err := moduleCli.GetCalendarFreeBusyList(ctx, &lark.GetCalendarFreeBusyListReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarGenerateCaldavConf(func(ctx context.Context, request *lark.GenerateCaldavConfReq, options ...lark.MethodOptionFunc) (*lark.GenerateCaldavConfResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarGenerateCaldavConf()

			_, _, err := moduleCli.GenerateCaldavConf(ctx, &lark.GenerateCaldavConfReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarCreateCalendarExchangeBinding(func(ctx context.Context, request *lark.CreateCalendarExchangeBindingReq, options ...lark.MethodOptionFunc) (*lark.CreateCalendarExchangeBindingResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarCreateCalendarExchangeBinding()

			_, _, err := moduleCli.CreateCalendarExchangeBinding(ctx, &lark.CreateCalendarExchangeBindingReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarDeleteCalendarExchangeBinding(func(ctx context.Context, request *lark.DeleteCalendarExchangeBindingReq, options ...lark.MethodOptionFunc) (*lark.DeleteCalendarExchangeBindingResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarDeleteCalendarExchangeBinding()

			_, _, err := moduleCli.DeleteCalendarExchangeBinding(ctx, &lark.DeleteCalendarExchangeBindingReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

		t.Run("", func(t *testing.T) {

			cli.Mock().MockCalendarGetCalendarExchangeBinding(func(ctx context.Context, request *lark.GetCalendarExchangeBindingReq, options ...lark.MethodOptionFunc) (*lark.GetCalendarExchangeBindingResp, *lark.Response, error) {
				return nil, nil, fmt.Errorf("mock-failed")
			})
			defer cli.Mock().UnMockCalendarGetCalendarExchangeBinding()

			_, _, err := moduleCli.GetCalendarExchangeBinding(ctx, &lark.GetCalendarExchangeBindingReq{})
			as.NotNil(err)
			as.Equal(err.Error(), "mock-failed")
		})

	})

	t.Run("response is failed", func(t *testing.T) {
		cli := AppNoPermission.Ins()
		moduleCli := cli.Calendar

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.CreateCalendarACL(ctx, &lark.CreateCalendarACLReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.DeleteCalendarACL(ctx, &lark.DeleteCalendarACLReq{
				CalendarID: "x",
				ACLID:      "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GetCalendarACLList(ctx, &lark.GetCalendarACLListReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.SubscribeCalendarACL(ctx, &lark.SubscribeCalendarACLReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.UnsubscribeCalendarACL(ctx, &lark.UnsubscribeCalendarACLReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GetPrimaryCalendar(ctx, &lark.GetPrimaryCalendarReq{})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.CreateCalendar(ctx, &lark.CreateCalendarReq{})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.DeleteCalendar(ctx, &lark.DeleteCalendarReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GetCalendar(ctx, &lark.GetCalendarReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GetCalendarList(ctx, &lark.GetCalendarListReq{})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.UpdateCalendar(ctx, &lark.UpdateCalendarReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.SearchCalendar(ctx, &lark.SearchCalendarReq{})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.SubscribeCalendar(ctx, &lark.SubscribeCalendarReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.UnsubscribeCalendar(ctx, &lark.UnsubscribeCalendarReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.SubscribeCalendarChangeEvent(ctx, &lark.SubscribeCalendarChangeEventReq{})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.UnsubscribeCalendarChangeEvent(ctx, &lark.UnsubscribeCalendarChangeEventReq{})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.CreateCalendarEvent(ctx, &lark.CreateCalendarEventReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.DeleteCalendarEvent(ctx, &lark.DeleteCalendarEventReq{
				CalendarID: "x",
				EventID:    "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GetCalendarEvent(ctx, &lark.GetCalendarEventReq{
				CalendarID: "x",
				EventID:    "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GetCalendarEventList(ctx, &lark.GetCalendarEventListReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.UpdateCalendarEvent(ctx, &lark.UpdateCalendarEventReq{
				CalendarID: "x",
				EventID:    "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.SearchCalendarEvent(ctx, &lark.SearchCalendarEventReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.SubscribeCalendarEvent(ctx, &lark.SubscribeCalendarEventReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.UnsubscribeCalendarEvent(ctx, &lark.UnsubscribeCalendarEventReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.ReplyCalendarEvent(ctx, &lark.ReplyCalendarEventReq{
				CalendarID: "x",
				EventID:    "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GetCalendarEventInstanceList(ctx, &lark.GetCalendarEventInstanceListReq{
				CalendarID: "x",
				EventID:    "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GetCalendarEventInstanceViewList(ctx, &lark.GetCalendarEventInstanceViewListReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.DeleteCalendarEventMeetingChat(ctx, &lark.DeleteCalendarEventMeetingChatReq{
				CalendarID: "x",
				EventID:    "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.CreateCalendarEventMeetingChat(ctx, &lark.CreateCalendarEventMeetingChatReq{
				CalendarID: "x",
				EventID:    "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.CreateCalendarTimeoffEvent(ctx, &lark.CreateCalendarTimeoffEventReq{})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.DeleteCalendarTimeoffEvent(ctx, &lark.DeleteCalendarTimeoffEventReq{
				TimeoffEventID: "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.BatchGetCalendarMeetingRoomSummary(ctx, &lark.BatchGetCalendarMeetingRoomSummaryReq{})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.BatchGetCalendarMeetingRoomFreebusy(ctx, &lark.BatchGetCalendarMeetingRoomFreebusyReq{})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.ReplyCalendarMeetingRoomInstance(ctx, &lark.ReplyCalendarMeetingRoomInstanceReq{})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.CreateCalendarEventAttendee(ctx, &lark.CreateCalendarEventAttendeeReq{
				CalendarID: "x",
				EventID:    "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.DeleteCalendarEventAttendee(ctx, &lark.DeleteCalendarEventAttendeeReq{
				CalendarID: "x",
				EventID:    "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GetCalendarEventAttendeeList(ctx, &lark.GetCalendarEventAttendeeListReq{
				CalendarID: "x",
				EventID:    "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GetCalendarEventAttendeeChatMemberList(ctx, &lark.GetCalendarEventAttendeeChatMemberListReq{
				CalendarID: "x",
				EventID:    "x",
				AttendeeID: "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GetCalendarFreeBusyList(ctx, &lark.GetCalendarFreeBusyListReq{})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GenerateCaldavConf(ctx, &lark.GenerateCaldavConfReq{})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.CreateCalendarExchangeBinding(ctx, &lark.CreateCalendarExchangeBindingReq{})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.DeleteCalendarExchangeBinding(ctx, &lark.DeleteCalendarExchangeBindingReq{
				ExchangeBindingID: "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GetCalendarExchangeBinding(ctx, &lark.GetCalendarExchangeBindingReq{
				ExchangeBindingID: "x",
			})
			as.NotNil(err)
			as.True(lark.GetErrorCode(err) > 0, fmt.Sprintf("need get lark err, but get %s", err))
		})

	})

	t.Run("fake request is failed", func(t *testing.T) {
		cli := AppAllPermission.Ins()
		moduleCli := cli.Calendar
		cli.Mock().MockRawRequest(func(ctx context.Context, req *lark.RawRequestReq, resp interface{}) (response *lark.Response, err error) {
			return nil, fmt.Errorf("fake raw request")
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.CreateCalendarACL(ctx, &lark.CreateCalendarACLReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.DeleteCalendarACL(ctx, &lark.DeleteCalendarACLReq{
				CalendarID: "x",
				ACLID:      "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GetCalendarACLList(ctx, &lark.GetCalendarACLListReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.SubscribeCalendarACL(ctx, &lark.SubscribeCalendarACLReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.UnsubscribeCalendarACL(ctx, &lark.UnsubscribeCalendarACLReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GetPrimaryCalendar(ctx, &lark.GetPrimaryCalendarReq{})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.CreateCalendar(ctx, &lark.CreateCalendarReq{})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.DeleteCalendar(ctx, &lark.DeleteCalendarReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GetCalendar(ctx, &lark.GetCalendarReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GetCalendarList(ctx, &lark.GetCalendarListReq{})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.UpdateCalendar(ctx, &lark.UpdateCalendarReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.SearchCalendar(ctx, &lark.SearchCalendarReq{})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.SubscribeCalendar(ctx, &lark.SubscribeCalendarReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.UnsubscribeCalendar(ctx, &lark.UnsubscribeCalendarReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.SubscribeCalendarChangeEvent(ctx, &lark.SubscribeCalendarChangeEventReq{})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.UnsubscribeCalendarChangeEvent(ctx, &lark.UnsubscribeCalendarChangeEventReq{})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.CreateCalendarEvent(ctx, &lark.CreateCalendarEventReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.DeleteCalendarEvent(ctx, &lark.DeleteCalendarEventReq{
				CalendarID: "x",
				EventID:    "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GetCalendarEvent(ctx, &lark.GetCalendarEventReq{
				CalendarID: "x",
				EventID:    "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GetCalendarEventList(ctx, &lark.GetCalendarEventListReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.UpdateCalendarEvent(ctx, &lark.UpdateCalendarEventReq{
				CalendarID: "x",
				EventID:    "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.SearchCalendarEvent(ctx, &lark.SearchCalendarEventReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.SubscribeCalendarEvent(ctx, &lark.SubscribeCalendarEventReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.UnsubscribeCalendarEvent(ctx, &lark.UnsubscribeCalendarEventReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.ReplyCalendarEvent(ctx, &lark.ReplyCalendarEventReq{
				CalendarID: "x",
				EventID:    "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GetCalendarEventInstanceList(ctx, &lark.GetCalendarEventInstanceListReq{
				CalendarID: "x",
				EventID:    "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GetCalendarEventInstanceViewList(ctx, &lark.GetCalendarEventInstanceViewListReq{
				CalendarID: "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.DeleteCalendarEventMeetingChat(ctx, &lark.DeleteCalendarEventMeetingChatReq{
				CalendarID: "x",
				EventID:    "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.CreateCalendarEventMeetingChat(ctx, &lark.CreateCalendarEventMeetingChatReq{
				CalendarID: "x",
				EventID:    "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.CreateCalendarTimeoffEvent(ctx, &lark.CreateCalendarTimeoffEventReq{})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.DeleteCalendarTimeoffEvent(ctx, &lark.DeleteCalendarTimeoffEventReq{
				TimeoffEventID: "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.BatchGetCalendarMeetingRoomSummary(ctx, &lark.BatchGetCalendarMeetingRoomSummaryReq{})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.BatchGetCalendarMeetingRoomFreebusy(ctx, &lark.BatchGetCalendarMeetingRoomFreebusyReq{})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.ReplyCalendarMeetingRoomInstance(ctx, &lark.ReplyCalendarMeetingRoomInstanceReq{})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.CreateCalendarEventAttendee(ctx, &lark.CreateCalendarEventAttendeeReq{
				CalendarID: "x",
				EventID:    "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.DeleteCalendarEventAttendee(ctx, &lark.DeleteCalendarEventAttendeeReq{
				CalendarID: "x",
				EventID:    "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GetCalendarEventAttendeeList(ctx, &lark.GetCalendarEventAttendeeListReq{
				CalendarID: "x",
				EventID:    "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GetCalendarEventAttendeeChatMemberList(ctx, &lark.GetCalendarEventAttendeeChatMemberListReq{
				CalendarID: "x",
				EventID:    "x",
				AttendeeID: "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GetCalendarFreeBusyList(ctx, &lark.GetCalendarFreeBusyListReq{})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GenerateCaldavConf(ctx, &lark.GenerateCaldavConfReq{})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.CreateCalendarExchangeBinding(ctx, &lark.CreateCalendarExchangeBindingReq{})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.DeleteCalendarExchangeBinding(ctx, &lark.DeleteCalendarExchangeBindingReq{
				ExchangeBindingID: "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

		t.Run("", func(t *testing.T) {

			_, _, err := moduleCli.GetCalendarExchangeBinding(ctx, &lark.GetCalendarExchangeBindingReq{
				ExchangeBindingID: "x",
			})
			as.NotNil(err)
			as.Equal("fake raw request", err.Error())
		})

	})
}
