anchor.diff:    ].
   
   rebuild_tasks_t_(_) ->
  -  Tasks = gen_server:call(fyler_server, tasks),
  +  Tasks = fyler_server:current_tasks(),
     {{value,#task{file=File, category=Category, callback=Callback}},_} = fyler_queue:out(maps:get(test,Tasks)),
     [
       ?_assertMatch(#file{bucket="test", name="test"},File),
  
positive.code: %% gen_server callbacks
  -record(state, {
    cowboy_pid :: pid(),
    aws_bucket :: string(),
    aws_dir :: string(),
    managers = #{} :: #{atom() => pid()}
  }).
  
negative.code: -define(setup2(F), {setup, fun setup2_/0, fun cleanup_/1, F}).
  
  path_to_test() ->
    ?assertEqual({false, false, "http://qwe/data.ext", "data", "ext"}, parse_url("http://qwe/data.ext")),
    ?assertEqual({false, false, "http://dev2.teachbase.ru/app/cpi.txt", "cpi", "txt"}, parse_url("http://dev2.teachbase.ru/app/cpi.txt")),
    ?assertEqual({false, false, "https://qwe/qwe/qwr/da.ta.ext", "da.ta", "ext"}, parse_url("https://qwe/qwe/qwr/da.ta.ext")),
    ?assertEqual({true, "qwe", "qwe/da.ta.ext", "da.ta", "ext"}, parse_url("http://qwe.s3-eu-west-1.amazonaws.com/da.ta.ext")),
    ?assertEqual({true, "qwe", "qwe/da.ta.ext", "da.ta", "ext"}, parse_url("https://s3-eu-west-1.amazonaws.com/qwe/da.ta.ext")),
    ?assertEqual({true, "qwe", "qwe/da.ta.ext", "da.ta", "ext"}, parse_url("http://qwe.s3.amazonaws.com/da.ta.ext")),
    ?assertEqual({true, "qwe", "qwe/path/to/object/da.ta.ext", "da.ta", "ext"}, parse_url("http://qwe.s3-eu-west-1.amazonaws.com/path/to/object/da.ta.ext")),
    ?assertEqual(false, parse_url("qwr/data.ext")).
  
  
  dir_url_test() ->
  