You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: orm_test.go
    path of file: ./repos/chainlink/core/services/gateway/handlers/functions/allowlist
    
    the code of the file until where you have to start completion: package allowlist_test

import (
	"testing"

	"github.com/ethereum/go-ethereum/common"
	"github.com/stretchr/testify/require"

	"github.com/smartcontractkit/chainlink/v2/core/internal/testutils"
	"github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest"
	"github.com/smartcontractkit/chainlink/v2/core/logger"
	"github.com/smartcontractkit/chainlink/v2/core/services/gateway/handlers/functions/allowlist"
)

func setupORM(t *testing.T) (allowlist.ORM, error) {
	t.Helper()

	var (
		db   = pgtest.NewSqlxDB(t)
		lggr = logger.TestLogger(t)
	)

	return allowlist.NewORM(db, lggr, pgtest.NewQConfig(true), testutils.NewAddress())
}

func seedAllowedSenders(t *testing.T, orm allowlist.ORM, amount int) []common.Add
    
func TestORM_CreateAllowedSenders(t *testing.T) {
	t.Parallel()

	t.Run("OK-create_an_allowed_sender", func(t *testing.T) {
		orm, err := setupORM(t)
		require.NoError(t, err)
		expected := testutils.NewAddress()
		err = orm.CreateAllowedSenders([]common.Address{expected})
		require.NoError(t, err)

		results, err := orm.GetAllowedSenders(0, 1)
		require.NoError(t, err)
		require.Equal(t, 1, len(results), "incorrect results length")
		require.Equal(t, expected, results[0])
	})

	t.Run("OK-create_an_existing_allowed_sender", func(t *testing.T) {
		orm, err := setupORM(t)
		require.NoError(t, err)
		expected := testutils.NewAddress()
		err = orm.CreateAllowedSenders([]common.Address{expected})
		require.NoError(t, err)

		err = orm.CreateAllowedSenders([]common.Address{expected})
		require.NoError(t, err)

		results, err := orm.GetAllowedSenders(0, 5)
		require.NoError(t, err)
		require.Equal(t, 1, len(results), "incorrect results length")
		require.Equal(t, expected, results[0])
	})

	t.Run("OK-create_multiple_allowed_senders_in_one_query", func(t *testing.T) {
		orm, err := setupORM(t)
		require.NoError(t, err)
		expected := []common.Address{testutils.NewAddress(), testutils.NewAddress()}
		err = orm.CreateAllowedSenders(expected)
		require.NoError(t, err)

		results, err := orm.GetAllowedSenders(0, 2)
		require.NoError(t, err)
		require.Equal(t, 2, len(results), "incorrect results length")
		require.Equal(t, expected[0], results[0])
		require.Equal(t, expected[1], results[1])
	})

	t.Run("OK-create_multiple_allowed_senders_with_duplicates", func(t *testing.T) {
		orm, err := setupORM(t)
		require.NoError(t, err)
		addr1 := testutils.NewAddress()
		addr2 := testutils.NewAddress()
		expected := []common.Address{addr1, addr2}

		duplicatedAddressInput := []common.Address{addr1, addr1, addr1, addr2}
		err = orm.CreateAllowedSenders(duplicatedAddressInput)
		require.NoError(t, err)

		results, err := orm.GetAllowedSenders(0, 10)
		require.NoError(t, err)
		require.Equal(t, 2, len(results), "incorrect results length")
		require.Equal(t, expected[0], results[0])
		require.Equal(t, expected[1], results[1])
	})
}