anchor.diff:                                               end),
                 meck:expect(wrq, set_resp_body, fun(Body, req_mock) -> Body end),
                 {IsMalformed, GotMsg, _State} =
  -                  chef_rest_search_resource:malformed_request(req_mock, #state{}),
  +                  chef_rest_search_resource:malformed_request(req_mock, make_state()),
                 ErrorMsg = <<"{\"error\":[\"invalid search query: 'a[b'\"]}">>,
                 ?assertEqual(true, IsMalformed),
                 ?assertEqual(ErrorMsg, GotMsg),
  
positive.code:                                           end),
                meck:expect(wrq, set_resp_body, fun(Body, req_mock) -> Body end),
                {IsMalformed, GotMsg, _State} =
                    chef_rest_search_resource:malformed_request(req_mock, #state{}),
                ErrorMsg = list_to_binary("{\"error\":[\"missing required authentication header(s) "
                                          "'X-Ops-UserId', 'X-Ops-Timestamp', "
                                          "'X-Ops-Sign', 'X-Ops-Content-Hash'\"]}"),
  
negative.code:                                                      "X_CHEF_id_CHEF_X+asc"
                                               end),
                {IsMalformed, _Req1, State} =
                    chef_rest_search_resource:malformed_request(req_mock, make_state()),
                ?assertEqual(false, IsMalformed),
                %% FIXME: this is a record defined in chef_solr
                SolrQuery = State#state.solr_query,
  