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: param_test.go
    path of file: ./repos/pocketbase/daos
    
    the code of the file until where you have to start completion: package daos_test

import (
	"encoding/json"
	"testing"

	"github.com/pocketbase/pock
    
func TestFindParamByKey(t *testing.T) {
	t.Parallel()

	app, _ := tests.NewTestApp()
	defer app.Cleanup()

	scenarios := []struct {
		key         string
		expectError bool
	}{
		{"", true},
		{"missing", true},
		{models.ParamAppSettings, false},
	}

	for i, scenario := range scenarios {
		param, err := app.Dao().FindParamByKey(scenario.key)

		hasErr := err != nil
		if hasErr != scenario.expectError {
			t.Errorf("(%d) Expected hasErr to be %v, got %v (%v)", i, scenario.expectError, hasErr, err)
		}

		if param != nil && param.Key != scenario.key {
			t.Errorf("(%d) Expected param with identifier %s, got %v", i, scenario.key, param.Key)
		}
	}
}