anchor.diff:  %%% Functions used to validate REST calls
   %%%=================================================================
   
  -check_identify(Code, Args, Method, ExpectedBody, Config) ->
  -    check_oai_request(Code, <<"Identify">>, Args, Method, ExpectedBody, Config).
  -
  -check_no_verb_error(Code, Args, Method, ExpectedBody, Config) ->
  -    check_oai_request(Code, none, Args, Method, ExpectedBody, Config).
  -
  -check_empty_verb_error(Code, Args, Method, ExpectedBody, Config) ->
  -    check_oai_request(Code, <<"">>, Args, Method, ExpectedBody, Config).
  -
  -check_invalid_verb_error(Code, Args, Method, ExpectedBody, Config) ->
  -    check_oai_request(Code, <<"invalid_verb">>, Args, Method, ExpectedBody, Config).
  -
  -check_illegal_arg_error(Code, Args, Method, ExpectedBody, Config) ->
  -    check_oai_request(Code, <<"Identify">>, Args, Method, ExpectedBody, Config).
  -
  -check_oai_request(Code, Verb, Args, Method, ExpectedBody, Config) ->
  -    
  +check_identify(Code, Args, Method, ExpResponseContent, Config) ->
  +    check_oai_request(Code, <<"Identify">>, Args, Method, ExpResponseContent, 'Identify',Config).
  +
  +check_no_verb_error(Code, Args, Method, ExpResponseContent, Config) ->
  +    check_oai_request(Code, none, Args, Method, ExpResponseContent, {error, badVerb}, Config).
  +
  +check_empty_verb_error(Code, Args, Method, ExpResponseContent, Config) ->
  +    check_oai_request(Code, <<"">>, Args, Method, ExpResponseContent, {error, badVerb}, Config).
  +
  +check_invalid_verb_error(Code, Args, Method, ExpResponseContent, Config) ->
  +    check_oai_request(Code, <<"invalid_verb">>, Args, Method, ExpResponseContent, {error, badVerb}, Config).
  +
  +check_illegal_arg_error(Code, Args, Method, ExpResponseContent, Config) ->
  +    check_oai_request(Code, <<"Identify">>, Args, Method, ExpResponseContent, {error, badArgument}, Config).
  +
  +
  +check_oai_request(Code, Verb, Args, Method, ExpResponseContent, ResponseType, Config) ->
  +
       URL = ?config(oai_pmh_url, Config),
       Path = ?config(oai_pmh_path, Config),
       Args2 = case Verb of
           none -> Args;
           _ -> add_verb(Verb, Args)
       end,
  +    ExpectedBody = expected_body(Config, ExpResponseContent, ResponseType, Args2),
       QueryString = prepare_querystring(Args2),
   
       Request = case Method of
  
positive.code:     no_verb_get_test/1, no_verb_post_test/1,
      invalid_verb_get_test/1, invalid_verb_post_test/1,
      empty_verb_get_test/1, empty_verb_post_test/1,
      illegal_arg_get_test/1, illegal_arg_post_test/1]).
  
  %% useful macros
  -define(CONTENT_TYPE_HEADER, [{<<"content-type">>, <<"application/x-www-form-urlencoded">>}]).
  -define(RESPONSE_CONTENT_TYPE_HEADER, [{<<"content-type">>, <<"text/xml">>}]).
  
  
  
  %%%===================================================================
  
negative.code: 
      [Node | _] = ?config(oz_worker_nodes, Config),
      Path = ?config(oai_pmh_path, Config),
      ExpectedBaseURL = string:concat(get_domain(Node), binary_to_list(Path)),
  
      ExpResponseContent = [
          #xmlElement{name = repositoryName, content = [#xmlText{value = "unnamed"}]},
          #xmlElement{name = baseURL, content = [#xmlText{value = ExpectedBaseURL}]},
          #xmlElement{name = protocolVersion, content = [#xmlText{value = "2.0"}]},
          #xmlElement{name = earliestDatestamp}, %todo how to check it
          #xmlElement{name = deletedRecord, content = [#xmlText{value = "no"}]},
          #xmlElement{name = granularity, content = [#xmlText{value = "YYYY-MM-DDThh:mm:ss:Z"}]},
          #xmlElement{name = adminEmail, content = [#xmlText{value = "info@onedata.org"}]}
      ],
      ?assert(check_identify(200, [], Method, ExpResponseContent, Config)).
  
  no_verb_test_base(Config, Method) ->
      ?assert(check_no_verb_error(200, [], Method, [], Config)).
  
  empty_verb_test_base(Config, Method) ->
      ?assert(check_empty_verb_error(200, [], Method, [], Config)).
  
  invalid_verb_test_base(Config, Method) ->
      ?assert(check_invalid_verb_error(200, [], Method, [], Config)).
  
  illegal_arg_test_base(Config, Method) ->
      ?assert(check_illegal_arg_error(200, [{"k", "v"}], Method, [], Config)).
  
  
  %%%===================================================================
  