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: handler_test.go
    path of file: ./repos/client/go/kbnm
    
    the code of the file until where you have to start completion: package main

import (
	"io"
	"os/exec"
	"strings"
	"testing"
)

func TestHandlerChat(t *testing.T) {
	h := newHandler()

	var ranCmd string
	h.Run = func(cmd *exec.Cmd) error {
		ranCmd = strings.Join(cmd.Args, " ")
		return nil
	}
	h.FindKeybaseBinary = func() (string, error) {
		return "/mocked/test/path/keybase", nil
	}

	req := &Request{
		Method: "chat",
		Body:   "te
    
func TestHandlerQueryErrorUnexpected(t *testing.T) {
	h := newHandler()

	var ranCmd string
	h.Run = func(cmd *exec.Cmd) error {
		ranCmd = strings.Join(cmd.Args, " ")
		_ = ranCmd
		_, err := io.WriteString(cmd.Stderr, queryResponseErrUnexpected)
		return err
	}
	h.FindKeybaseBinary = func() (string, error) {
		return "/mocked/test/path/keybase", nil
	}

	req := &Request{
		Method: "query",
		To:     "doesnotexist",
	}

	_, err := h.Handle(req)
	if err == nil {
		t.Fatal("request succeeded when failure was expected")
	}

	if got, want := err.Error(), "unexpected error: Something unexpected happened"; got != want {
		t.Errorf("incorrect error; got: %q, want %q", got, want)
	}
}