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: file_realm_test.go
    path of file: ./repos/convoy/auth/realm/file
    
    the code of the file until where you have to start completion: package file

import (
	"context"
	"testing"

	"github.com/stretchr/testify/require"

	"github.com/frain-dev/convoy/auth"
	"github.com/frain-dev/convoy/config"
)

var fileRealmOpt = &config.FileRealmOption{
	Basic: []config.BasicAuth{
		{
			Username: "username1",
			Password: "password1",
			Role: auth.Role{
				Type:    auth.RoleAdmin,
				Project: "sendcash-pay",
			},
		},
		{
			Username: "username2",
			Password: "password2",
			Role: auth.Role{
				Type:    auth.RoleAdmin,
				Project: "buycoins",
			},
		},
		{
			Username: "username3",
			Password: "password3",
			Role: auth.Role{

    
func TestNewFileRealm(t *testing.T) {
	type args struct {
		opt *config.FileRealmOption
	}
	tests := []struct {
		name       string
		args       args
		want       *FileRealm
		wantErr    bool
		wantErrMsg string
	}{
		{
			name: "should_initialize_file_realm_successfully",
			args: args{
				opt: fileRealmOpt,
			},
			want: &FileRealm{
				Basic: []BasicAuth{
					{
						Username: "username1",
						Password: "password1",
						Role: auth.Role{
							Type:    auth.RoleAdmin,
							Project: "sendcash-pay",
						},
					},
					{
						Username: "username2",
						Password: "password2",
						Role: auth.Role{
							Type:    auth.RoleAdmin,
							Project: "buycoins",
						},
					},
					{
						Username: "username3",
						Password: "password3",
						Role: auth.Role{
							Type:    auth.RoleSuperUser,
							Project: "paystack",
						},
					},
					{
						Username: "username4",
						Password: "password4",
						Role: auth.Role{
							Type:    auth.RoleAPI,
							Project: "termii",
						},
					},
				},
				APIKey: []APIKeyAuth{
					{
						APIKey: "avcbajbwrohw@##Q39uekvsmbvxc.fdjhd",
						Role: auth.Role{
							Type:    auth.RoleAdmin,
							Project: "sendcash-pay",
						},
					},
				},
			},
			wantErr: false,
		},
	}

	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			got, err := NewFileRealm(tt.args.opt)

			if tt.wantErr {
				require.Equal(t, tt.wantErrMsg, err.Error())
				return
			}

			require.Nil(t, err)
			require.Equal(t, got, tt.want)
		})
	}
}