anchor.diff:          Config, ?TEST_FILE(Config, "env_desc.json"), [oz_test_utils]
       ),
       [Node1 | _] = ?config(oz_worker_nodes, NewConfig),
  -    [{oai_pmh_url, get_oai_pmh_URL(Node1)},
  -        {oai_pmh_path, get_oai_pmh_api_path(Node1)} | NewConfig].
  +    [
  +        {oai_pmh_url, get_oai_pmh_URL(Node1)},
  +        {oai_pmh_path, get_oai_pmh_api_path(Node1)} | NewConfig
  +    ].
   
   init_per_testcase(_, Config) ->
       rest_test_utils:set_config(Config),
  
positive.code: 
  end_per_testcase(_, _Config) ->
      ok.
  %%    {KeyFile, CSRFile, CertFile} = ?config(cert_files, Config),
  %%    file:delete(KeyFile),
  %%    file:delete(CSRFile),
  %%    file:delete(CertFile).
  
  end_per_suite(Config) ->
      hackney:stop(),
  
negative.code:     [_Node | Domain] = string:tokens(atom_to_list(Hostname), "."),
      string:join(Domain, ".").
  
  
  expected_body(Config, ExpectedResponse, ResponseType, Args) ->
      Path = ?config(oai_pmh_path, Config),
      URL = ?config(oai_pmh_url, Config),
      RequestURL = binary_to_list(<<URL/binary, Path/binary>>),
      %% todo add namespace attributes
  
      ExpectedResponseElement = case ResponseType of
          {error, Code} -> expected_response_error(Code);
          Verb -> expected_response_verb(Verb, ExpectedResponse)
      end,
  
      ExpectedRequestElement = case ResponseType of
          %% when error is badVerb or badArgument request element
          %% should only contain request URL
          {error, badVerb} -> expected_request_element(RequestURL);
          {error, badArgument} -> expected_request_element(RequestURL);
          _ -> expected_request_element(RequestURL, Args)
      end,
  
      #xmlElement{
          name = 'OAI-PMH',
          content = [
              ExpectedRequestElement,
              #xmlElement{name = responseDate},
              ExpectedResponseElement
          ]
      }.
  
  expected_response_error(Code) ->
    #xmlElement{
          name = error,
          attributes = [#xmlAttribute{name = code, value = str_utils:to_list(Code)}]
      }.
  
  expected_response_verb(Verb, Content) ->
      #xmlElement{name = ensure_atom(Verb), content=Content}.
  
  expected_request_element(RequestURL) ->
      expected_request_element(RequestURL, []).
  
  expected_request_element(RequestURL, Args) ->
      Attributes = lists:map(fun({K, V}) ->
          #xmlAttribute{name=binary_to_atom(K, latin1), value=binary_to_list(V)}
      end, Args),
      #xmlElement{
          name = request,
          attributes = Attributes,
          content = [#xmlText{value = RequestURL}]
      }.
  
  ensure_atom(Arg) when is_atom(Arg) -> Arg;
  ensure_atom(Arg) when is_binary(Arg) -> binary_to_atom(Arg, latin1);
  ensure_atom(Arg) when is_list(Arg) -> list_to_atom(Arg).