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: user_test.go
    path of file: ./repos/corteza/server/system/service
    
    the code of the file until where you have to start completion: package service

import (
	"context"
	"testing"

	"github.com/stretchr/testify/assert"

	a "github.com/cortezaproject/corteza/server/pkg/auth"
	"github.com/cortezaproject/corteza/server/pkg/eventbus"
	"github.com/cortezaproject/corteza/server/pkg/rbac"
	"github.com/cortezaproject/corteza/server/store"
	"github.com/cortezaproject/corteza/server/store/adapters/rdbms/drivers/sqlite"
	"github.com/cortezaproject/corteza/server/system/types"
	"github.com/stretchr/testify/require"
	"go.uber.org/zap"
)

type (
	u struct {
		store.Users
		L func(ctx context.Context, handle string) (*types.User, error)
	}
)

func TestUser_ProtectedSearch(t *testing.T) {
	const testRoleID = 123

	var (
		req = require.New(t)
		ctx = context.Background()

		masked   = &types.User{Email: "email.masked@us.er", Name: "Name MSKD", ID: nextID(), CreatedAt: *now()}
		unmasked = &types.User{Email: "email.unmasked@us.er", Name: "Name UNMSKD", ID: nextID(), CreatedAt: *now()}

		set 
    
func Test_processAvatarInitials(t *testing.T) {
	// Define test cases
	tests := []struct {
		name            string
		user            *types.User
		expectedInitial string
	}{
		{
			name: "Test with valid name",
			user: &types.User{
				Name: "John Doe",
			},
			expectedInitial: "JD",
		},
		{
			name: "Test with valid handle",
			user: &types.User{
				Handle: "johndoe",
			},
			expectedInitial: "J",
		},
		{
			name: "Test handle with a delimiter",
			user: &types.User{
				Handle: "john_doe",
			},
			expectedInitial: "JD",
		},
		{
			name: "Test with valid handle",
			user: &types.User{
				Email: "johndoe@example.com",
			},
			expectedInitial: "J",
		},
		{
			name: "Test email with a delimiter",
			user: &types.User{
				Email: "john-doe@example.com",
			},
			expectedInitial: "JD",
		},
		{
			name: "Test with one letter name",
			user: &types.User{
				Name: "K",
			},
			expectedInitial: "K",
		},
		{
			name: "Test with one name",
			user: &types.User{
				Name: "Doe",
			},
			expectedInitial: "DO",
		},
		{
			name: "Test with three names",
			user: &types.User{
				Name: "John David Doe",
			},
			expectedInitial: "JDD",
		},
		{
			name: "Test with a name that has a valid and invalid letter",
			user: &types.User{
				Name: "k-",
			},
			expectedInitial: "K",
		},
	}

	// Run test cases
	for _, tc := range tests {
		t.Run(tc.name, func(t *testing.T) {
			initial := processAvatarInitials(tc.user)
			assert.Equal(t, tc.expectedInitial, initial)
		})
	}
}