code: func (f *FakeHandler) ValidateRequest(t TestInterface, expectedPath, expectedMethod string, body *string) {
  	f.lock.Lock()
  	defer f.lock.Unlock()
  	if f.requestCount != 1 {
  		t.Logf("Expected 1 call, but got %v. Only the last call is recorded and checked.", f.requestCount)
  	}
  	f.hasBeenChecked = true
  
  	expectURL, err := url.Parse(expectedPath)
  	if err != nil {
  		t.Errorf("Couldn't parse %v as a URL.", expectedPath)
  	}
  	if f.RequestReceived == nil {
  		t.Errorf("Unexpected nil request received for %s", expectedPath)
  		return
  	}
  	if f.RequestReceived.URL.Path != expectURL.Path {
  		t.Errorf("Unexpected request path for request %#v, received: %q, expected: %q", f.RequestReceived, f.RequestReceived.URL.Path, expectURL.Path)
  	}
  	if e, a := expectURL.Query(), f.RequestReceived.URL.Query(); !reflect.DeepEqual(e, a) {
  		t.Errorf("Unexpected query for request %#v, received: %q, expected: %q", f.RequestReceived, a, e)
  	}
  	if f.RequestReceived.Method != expectedMethod {
  		t.Errorf("Unexpected method: %q, expected: %q", f.RequestReceived.Method, expectedMethod)
  	}
  	if body != nil {
  		if *body != f.RequestBody {
  			t.Errorf("Received body:\n%s\n Doesn't match expected body:\n%s", f.RequestBody, *body)
  		}
  	}
  }
docs: // ValidateRequest verifies that FakeHandler received a request with expected path, method, and body.