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: dapr_handler_test.go
    path of file: ./repos/dapr/pkg/operator/handlers
    
    the code of the file until where you have to start completion: package handlers

import (
	"context"
	"reflect"
	"testing"

	argov1alpha1 "github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1"
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
	appsv1 "k8s.io/api/apps/v1"
	corev1 "k8s.io/api/core/v1"
	metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/apimachinery/pkg/types"
	"k8s.io/client-go/kubernetes/scheme"
	"sigs.k8s.io/controller-runtime/pkg/client/fake"

	"github.com/dapr/dapr/pkg/injector/annotations"
	"github.com/dapr/dapr/pkg/operator/testobjects"
	dapr_testing "github.com/dapr/dapr/pkg/testing"
)

func TestNewDaprHandler(t *testing.T) {
	d := getTestDaprHandler()
	assert.NotNil(t, d)
}

func TestGetAppID(t *testing.T) {
	testDaprHandler := getTestDaprHandler()
	t.Run("WithValidId", func(t *testing.T) {
		// Arrange
		expected := "test_id"
		deployment := getDeployment(expected, "true")

		// Act
		got := testDaprHandler.getAppID(deployment)

		// Assert
		assert.Equal(t, expected, got)
	})

	t.Run("WithEmptyId", func(t *testing.T) {
		// Arrange
		expected := ""
		deployment := getDeployment(expected, "true")

		// Act
		got := testDaprHandler.getAppID(deployment)

		// Assert
		assert.Equal(t, expected, got)
	})
}

func TestIsAnnotatedForDapr(t *testing.T) {
	testDaprHandler := getTestDaprHandler()
	t.Run("Enabled", func(t *testing.T) {
		// Arrange
		expected := "true"
		deployment := getDeploymen
    
func TestPatchDaprService(t *testing.T) {
	testDaprHandler := getTestDaprHandler()

	s := runtime.NewScheme()
	err := scheme.AddToScheme(s)
	require.NoError(t, err)
	testDaprHandler.Scheme = s

	cli := fake.NewClientBuilder().WithScheme(s).Build()
	testDaprHandler.Client = cli

	ctx := context.Background()
	myDaprService := types.NamespacedName{
		Namespace: "test",
		Name:      "test",
	}
	deployment := getDeployment("test", "true")

	err = testDaprHandler.createDaprService(ctx, myDaprService, deployment)
	require.NoError(t, err)
	var actualService corev1.Service
	err = cli.Get(ctx, myDaprService, &actualService)
	require.NoError(t, err)
	assert.Equal(t, "test", actualService.ObjectMeta.Annotations[annotations.KeyAppID])
	assert.Equal(t, "true", actualService.ObjectMeta.Annotations["prometheus.io/scrape"])
	assert.Equal(t, "/", actualService.ObjectMeta.Annotations["prometheus.io/path"])
	assert.Len(t, actualService.OwnerReferences, 1)
	assert.Equal(t, "Deployment", actualService.OwnerReferences[0].Kind)
	assert.Equal(t, "app", actualService.OwnerReferences[0].Name)

	err = testDaprHandler.patchDaprService(ctx, myDaprService, deployment, actualService)
	require.NoError(t, err)
	err = cli.Get(ctx, myDaprService, &actualService)
	require.NoError(t, err)
	assert.Equal(t, "test", actualService.ObjectMeta.Annotations[annotations.KeyAppID])
	assert.Equal(t, "true", actualService.ObjectMeta.Annotations["prometheus.io/scrape"])
	assert.Equal(t, "/", actualService.ObjectMeta.Annotations["prometheus.io/path"])
	assert.Len(t, actualService.OwnerReferences, 1)
	assert.Equal(t, "Deployment", actualService.OwnerReferences[0].Kind)
	assert.Equal(t, "app", actualService.OwnerReferences[0].Name)
}