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: auto_retry_list_test.go
    path of file: ./repos/benthos/internal/autoretry
    
    the code of the file until where you have to start completion: package autoretry

import (
	"context"
	"errors"
	"fmt"
	"testing"
	"time"

	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
)

var errCustomEOF = errors.New("custom EOF")

func TestRetryListAllAcks(t *testing.T) {
	tCtx, done := context.WithTimeout(context.Background(), time.Second)
	defer done()

	var acked []string

	data := []string{"foo", "bar", "baz"}
	l := NewList(func(ctx context.Context) (t string, aFn AckFunc, err error) {
		if len(data) == 0 {
			err = errCustomEOF
			return
		}
		next := data[0]
		data = data[1:]
		return next, fun
    
func TestRetryListAllAcks(t *testing.T) {
	tCtx, done := context.WithTimeout(context.Background(), time.Second)
	defer done()

	var acked []string

	data := []string{"foo", "bar", "baz"}
	l := NewList(func(ctx context.Context) (t string, aFn AckFunc, err error) {
		if len(data) == 0 {
			err = errCustomEOF
			return
		}
		next := data[0]
		data = data[1:]
		return next, func(ctx context.Context, err error) error {
			acked = append(acked, next)
			return nil
		}, nil
	}, nil)

	res, fooFn, err := l.Shift(tCtx, true)
	require.NoError(t, err)
	assert.Equal(t, "foo", res)

	res, barFn, err := l.Shift(tCtx, true)
	require.NoError(t, err)
	assert.Equal(t, "bar", res)

	res, bazFn, err := l.Shift(tCtx, true)
	require.NoError(t, err)
	assert.Equal(t, "baz", res)

	_, _, err = l.Shift(tCtx, true)
	require.Equal(t, errCustomEOF, err)

	assert.NoError(t, bazFn(tCtx, nil))
	assert.NoError(t, barFn(tCtx, nil))
	assert.NoError(t, fooFn(tCtx, nil))

	assert.Equal(t, []string{
		"baz", "bar", "foo",
	}, acked)

	fmt.Println("last shift")
	_, _, err = l.Shift(tCtx, false)
	assert.Equal(t, ErrExhausted, err)

	require.NoError(t, l.Close(tCtx))
}