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: log_test.go
    path of file: ./repos/testcontainers-go/wait
    
    the code of the file until where you have to start completion: package wait

import (
	"bytes"
	"context"
	"io"
	"testing"
	"time"

	"github.com/docker/docker/api/types"
)

const loremIpsum = `Lorem ipsum dolor sit amet,
consectetur adipiscing elit.
Donec a diam lectus.
Sed sit amet ipsum mauris.
Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit.
Donec et mollis dolor.
Praesent et diam eget libero egestas mattis sit amet vitae augue.
Nam tincidunt congue enim, ut porta lorem l
    
func TestWaitShouldFailWithExactNumberOfOccurrences(t *testing.T) {
	t.Run("no regexp", func(t *testing.T) {
		target := NopStrategyTarget{
			ReaderCloser: io.NopCloser(bytes.NewReader([]byte("kubernetes\r\ndocker"))),
		}
		wg := NewLogStrategy("docker").
			WithStartupTimeout(100 * time.Microsecond).
			WithOccurrence(2)
		err := wg.WaitUntilReady(context.Background(), target)
		if err == nil {
			t.Fatal("expected error")
		}
	})

	t.Run("as regexp", func(t *testing.T) {
		target := NopStrategyTarget{
			ReaderCloser: io.NopCloser(bytes.NewReader([]byte(loremIpsum))),
		}

		// get "Maecenas".
		// there are only one occurrence matching
		wg := NewLogStrategy(`^Mae[\w]?enas\s`).WithStartupTimeout(100 * time.Microsecond).AsRegexp().WithOccurrence(2)
		err := wg.WaitUntilReady(context.Background(), target)
		if err == nil {
			t.Fatal("expected error")
		}
	})
}