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: readers_test.go
    path of file: ./repos/moby/pkg/ioutils
    
    the code of the file until where you have to start completion: package ioutils // import "github.com/docker/docker/pkg/ioutils"

import (
	"context"
	"errors"
	"io"
	"strings"
	"testing"
	"testing/iotest"
	"time"
)

func TestReadCloserWrapperClose(t *testing.T) {
	const text = "hello world"
	testErr := errors.New("this will 
    
func TestReadCloserWrapperClose(t *testing.T) {
	const text = "hello world"
	testErr := errors.New("this will be called when closing")
	wrapper := NewReadCloserWrapper(strings.NewReader(text), func() error {
		return testErr
	})

	buf, err := io.ReadAll(wrapper)
	if err != nil {
		t.Errorf("io.ReadAll(wrapper) err = %v", err)
	}
	if string(buf) != text {
		t.Errorf("expected %v, got: %v", text, string(buf))
	}
	err = wrapper.Close()
	if !errors.Is(err, testErr) {
		// readCloserWrapper should have called the anonymous func and thus, fail
		t.Errorf("expected %v, got: %v", testErr, err)
	}
}