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: exec_util_test.go
    path of file: ./repos/cockroach/pkg/sql
    
    the code of the file until where you have to start completion: // Copyright 2021 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0, included in the file
// licenses/APL.txt.

package sql

import (
	"context"
	"testing"

	"github.com/cockroachdb/cockroach/pkg/settings/cluster"
	"github.com/cockroachdb/coc
    
func TestMaybeHashAppName(t *testing.T) {
	defer leaktest.AfterTest(t)()
	defer log.Scope(t).Close(t)

	secret := "secret"

	for _, tc := range []struct {
		name     string
		appName  string
		expected string
	}{
		{
			"basic app name is hashed",
			"my_app",
			"a4bc27b7",
		},
		{
			"internal app name is not hashed",
			"$ internal_app",
			"$ internal_app",
		},
		{
			"delegated app name is hashed",
			"$$ my_app",
			"$$ 9a7e689f",
		},
		{
			"delegated and reportable app name is not hashed",
			"$$ $ internal_app",
			"$$ $ internal_app",
		},
	} {
		t.Run(tc.name, func(t *testing.T) {
			out := MaybeHashAppName(tc.appName, secret)
			require.Equal(t, tc.expected, out)
		})
	}
}