func makeTestRepo() *TestRepo {
	testRepo := &TestRepo{
		ArgsIn:       make(map[string][]interface{}),
		ArgsOut:      make(map[string][]interface{}),
		SpecialFuncs: make(map[string]interface{}),
	}
	testRepo.ArgsIn[GetUserByExternalIDMethod] = make([]interface{}, 1)
	testRepo.ArgsIn[AddUserMethod] = make([]interface{}, 1)
	testRepo.ArgsIn[UpdateUserMethod] = make([]interface{}, 1)
	testRepo.ArgsIn[GetUsersFilteredMethod] = make([]interface{}, 1)
	testRepo.ArgsIn[GetGroupsByUserIDMethod] = make([]interface{}, 2)
	testRepo.ArgsIn[RemoveUserMethod] = make([]interface{}, 1)
	testRepo.ArgsIn[GetGroupByNameMethod] = make([]interface{}, 2)
	testRepo.ArgsIn[IsMemberOfGroupMethod] = make([]interface{}, 2)
	testRepo.ArgsIn[GetGroupMembersMethod] = make([]interface{}, 2)
	testRepo.ArgsIn[IsAttachedToGroupMethod] = make([]interface{}, 2)
	testRepo.ArgsIn[GetAttachedPoliciesMethod] = make([]interface{}, 2)
	testRepo.ArgsIn[GetGroupsFilteredMethod] = make([]interface{}, 1)
	testRepo.ArgsIn[RemoveGroupMethod] = make([]interface{}, 1)
	testRepo.ArgsIn[AddGroupMethod] = make([]interface{}, 1)
	testRepo.ArgsIn[AddMemberMethod] = make([]interface{}, 2)
	testRepo.ArgsIn[RemoveMemberMethod] = make([]interface{}, 2)
	testRepo.ArgsIn[UpdateGroupMethod] = make([]interface{}, 1)
	testRepo.ArgsIn[AttachPolicyMethod] = make([]interface{}, 2)
	testRepo.ArgsIn[DetachPolicyMethod] = make([]interface{}, 2)
	testRepo.ArgsIn[GetPolicyByNameMethod] = make([]interface{}, 2)
	testRepo.ArgsIn[AddPolicyMethod] = make([]interface{}, 1)
	testRepo.ArgsIn[UpdatePolicyMethod] = make([]interface{}, 1)
	testRepo.ArgsIn[RemovePolicyMethod] = make([]interface{}, 1)
	testRepo.ArgsIn[GetPoliciesFilteredMethod] = make([]interface{}, 1)
	testRepo.ArgsIn[GetAttachedGroupsMethod] = make([]interface{}, 2)
	testRepo.ArgsIn[OrderByValidColumnsMethod] = make([]interface{}, 1)
	testRepo.ArgsIn[GetProxyResourcesMethod] = make([]interface{}, 2)
	testRepo.ArgsIn[RemoveProxyResourceMethod] = make([]interface{}, 2)
	testRepo.ArgsIn[AddProxyResourceMethod] = make([]interface{}, 1)
	testRepo.ArgsIn[UpdateProxyResourceMethod] = make([]interface{}, 1)
	testRepo.ArgsIn[GetProxyResourceByNameMethod] = make([]interface{}, 2)
	testRepo.ArgsIn[AddOidcProviderMethod] = make([]interface{}, 1)
	testRepo.ArgsIn[GetOidcProviderByNameMethod] = make([]interface{}, 1)
	testRepo.ArgsIn[GetOidcProvidersFilteredMethod] = make([]interface{}, 1)
	testRepo.ArgsIn[UpdateOidcProviderMethod] = make([]interface{}, 1)
	testRepo.ArgsIn[RemoveOidcProviderMethod] = make([]interface{}, 1)
	testRepo.ArgsOut[GetUserByExternalIDMethod] = make([]interface{}, 2)
	testRepo.ArgsOut[AddUserMethod] = make([]interface{}, 2)
	testRepo.ArgsOut[UpdateUserMethod] = make([]interface{}, 2)
	testRepo.ArgsOut[GetUsersFilteredMethod] = make([]interface{}, 3)
	testRepo.ArgsOut[GetGroupsByUserIDMethod] = make([]interface{}, 3)
	testRepo.ArgsOut[RemoveUserMethod] = make([]interface{}, 1)
	testRepo.ArgsOut[GetGroupByNameMethod] = make([]interface{}, 2)
	testRepo.ArgsOut[IsMemberOfGroupMethod] = make([]interface{}, 2)
	testRepo.ArgsOut[GetGroupMembersMethod] = make([]interface{}, 3)
	testRepo.ArgsOut[IsAttachedToGroupMethod] = make([]interface{}, 2)
	testRepo.ArgsOut[GetAttachedPoliciesMethod] = make([]interface{}, 3)
	testRepo.ArgsOut[GetGroupsFilteredMethod] = make([]interface{}, 3)
	testRepo.ArgsOut[RemoveGroupMethod] = make([]interface{}, 1)
	testRepo.ArgsOut[AddGroupMethod] = make([]interface{}, 2)
	testRepo.ArgsOut[AddMemberMethod] = make([]interface{}, 1)
	testRepo.ArgsOut[RemoveMemberMethod] = make([]interface{}, 1)
	testRepo.ArgsOut[UpdateGroupMethod] = make([]interface{}, 2)
	testRepo.ArgsOut[AttachPolicyMethod] = make([]interface{}, 1)
	testRepo.ArgsOut[DetachPolicyMethod] = make([]interface{}, 1)
	testRepo.ArgsOut[GetPolicyByNameMethod] = make([]interface{}, 2)
	testRepo.ArgsOut[AddPolicyMethod] = make([]interface{}, 2)
	testRepo.ArgsOut[UpdatePolicyMethod] = make([]interface{}, 2)
	testRepo.ArgsOut[RemovePolicyMethod] = make([]interface{}, 1)
	testRepo.ArgsOut[GetPoliciesFilteredMethod] = make([]interface{}, 3)
	testRepo.ArgsOut[GetAttachedGroupsMethod] = make([]interface{}, 3)
	testRepo.ArgsOut[OrderByValidColumnsMethod] = make([]interface{}, 1)
	testRepo.ArgsOut[GetProxyResourcesMethod] = make([]interface{}, 3)
	testRepo.ArgsOut[RemoveProxyResourceMethod] = make([]interface{}, 1)
	testRepo.ArgsOut[AddProxyResourceMethod] = make([]interface{}, 2)
	testRepo.ArgsOut[UpdateProxyResourceMethod] = make([]interface{}, 2)
	testRepo.ArgsOut[GetProxyResourceByNameMethod] = make([]interface{}, 2)
	testRepo.ArgsOut[AddOidcProviderMethod] = make([]interface{}, 2)
	testRepo.ArgsOut[GetOidcProviderByNameMethod] = make([]interface{}, 2)
	testRepo.ArgsOut[GetOidcProvidersFilteredMethod] = make([]interface{}, 3)
	testRepo.ArgsOut[UpdateOidcProviderMethod] = make([]interface{}, 2)
	testRepo.ArgsOut[RemoveOidcProviderMethod] = make([]interface{}, 1)
	return testRepo
}
func that initializes the TestRepo
package api
import (
	"bytes"
	"fmt"
	"math/rand"
	"testing"
	"time"
	log "github.com/sirupsen/logrus"
	"github.com/stretchr/testify/assert"
)
const (
	GetUserByExternalIDMethod      = "GetUserByExternalID"
	AddUserMethod                  = "AddUser"
	UpdateUserMethod               = "UpdateUser"
	GetUsersFilteredMethod         = "GetUsersFiltered"
	GetGroupsByUserIDMethod        = "GetGroupsByUserID"
	RemoveUserMethod               = "RemoveUser"
	GetGroupByNameMethod           = "GetGroupByName"
	IsMemberOfGroupMethod          = "IsMemberOfGroup"
	GetGroupMembersMethod          = "GetGroupMembers"
	IsAttachedToGroupMethod        = "IsAttachedToGroup"
	GetAttachedPoliciesMethod      = "GetAttachedPolicies"
	GetGroupsFilteredMethod        = "GetGroupsFiltered"
	RemoveGroupMethod              = "RemoveGroup"
	AddGroupMethod                 = "AddGroup"
	AddMemberMethod                = "AddMember"
	RemoveMemberMethod             = "RemoveMember"
	UpdateGroupMethod              = "UpdateGroup"
	AttachPolicyMethod             = "AttachPolicy"
	DetachPolicyMethod             = "DetachPolicy"
	GetPolicyByNameMethod          = "GetPolicyByName"
	AddPolicyMethod                = "AddPolicy"
	UpdatePolicyMethod             = "UpdatePolicy"
	RemovePolicyMethod             = "RemovePolicy"
	GetPoliciesFilteredMethod      = "GetPoliciesFiltered"
	GetAttachedGroupsMethod        = "GetAttachedGroups"
	OrderByValidColumnsMethod      = "OrderByValidColumns"
	GetProxyResourcesMethod        = "GetProxyResources"
	RemoveProxyResourceMethod      = "RemoveProxyResource"
	AddProxyResourceMethod         = "AddProxyResource"
	UpdateProxyResourceMethod      = "UpdateProxyResource"
	GetProxyResourceByNameMethod   = "GetProxyResourceByName"
	AddOidcProviderMethod          = "AddOidcProvider"
	GetOidcProviderByNameMethod    = "GetOidcProviderByName"
	GetOidcProvidersFilteredMethod = "GetOidcProvidersFiltered"
	UpdateOidcProviderMethod       = "UpdateOidcProvider"
	RemoveOidcProviderMethod       = "RemoveOidcProviderMethod"
)
type TestRepo struct {
	ArgsIn       map[string][]interface{}
	ArgsOut      map[string][]interface{}
	SpecialFuncs map[string]interface{}
}
type TestUserGroupRelation struct {
	User     *User
	Group    *Group
	CreateAt time.Time
}
type TestPolicyGroupRelation struct {
	Group    *Group
	Policy   *Policy
	CreateAt time.Time
}
var testFilter = Filter{
	PathPrefix: "",
	Org:        "",
	GroupName:  "",
	PolicyName: "",
	ExternalID: "",
	Offset:     0,
	Limit:      20,
}