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: broker_test.go
    path of file: ./repos/pocketbase/tools/subscriptions
    
    the code of the file until where you have to start completion: package subscriptions_test

import (
	"testing"

	"github.com/pocketbase/pocketbase/tools/subscriptions"
)

func TestNewBroker(t *testing.T) {
	b := subscriptions.NewBroker()

	if b.Clients() == nil {
		t.Fatal("Expected clients map to be initialized")
	}
}

func TestClients(t *testing.T) {
	b := subscriptions.NewBroker()

	if total := len(b.C
    
func TestClientById(t *testing.T) {
	b := subscriptions.NewBroker()

	clientA := subscriptions.NewDefaultClient()
	clientB := subscriptions.NewDefaultClient()
	b.Register(clientA)
	b.Register(clientB)

	resultClient, err := b.ClientById(clientA.Id())
	if err != nil {
		t.Fatalf("Expected client with id %s, got error %v", clientA.Id(), err)
	}
	if resultClient.Id() != clientA.Id() {
		t.Fatalf("Expected client %s, got %s", clientA.Id(), resultClient.Id())
	}

	if c, err := b.ClientById("missing"); err == nil {
		t.Fatalf("Expected error, found client %v", c)
	}
}