anchor.diff:      AppDir = ?config(apps, Config),
       rebar_test_utils:create_app(AppDir, "A", "0.0.0", [kernel, stdlib]),
       RebarConf = rebar_test_utils:create_config(AppDir, [{deps, [{fakelib, "1.0.0", {pkg, goodpkg}}]}]),
  +    [{rebarconfig, RebarConf} | Config];
  +init_per_testcase(transitive_alias, Config0) ->
  +    Config = rebar_test_utils:init_rebar_state(Config0,"transitive_alias_vsn_"),
  +    AppDir = ?config(apps, Config),
  +    rebar_test_utils:create_app(AppDir, "A", "0.0.0", [kernel, stdlib]),
  +    RebarConf = rebar_test_utils:create_config(AppDir, [{deps, [{topdep, "1.0.0", {pkg, topdep}}]}]),
       [{rebarconfig, RebarConf} | Config].
   
   end_per_testcase(_, Config) ->
  
positive.code: -include_lib("eunit/include/eunit.hrl").
  -include_lib("kernel/include/file.hrl").
  
  all() -> [same_alias, diff_alias, diff_alias_vsn].
  
  %% {uuid, {pkg, uuid}} = uuid
  %% {uuid, {pkg, alias}} = uuid on disk
  
negative.code: unmock_config(Config) ->
      meck:unload(),
      Config.
  
  create_lib(Name, Config, PkgName) ->
      create_lib(Name, Config, PkgName, PkgName).
  
  create_lib(Name, Config, AppName, PkgName) ->
      Priv = ?config(priv_dir, Config),
      AppDir = filename:join([Priv, PkgName]),
      CacheRoot = filename:join([Priv, "cache", atom_to_list(Name)]),
      CacheDir = filename:join([CacheRoot, "hex", "com", "test", "packages"]),
      filelib:ensure_dir(filename:join([CacheDir, "registry"])),
      rebar_test_utils:create_app(AppDir, AppName, "1.0.0", [kernel, stdlib]),
      rebar_test_utils:package_app(AppDir, CacheDir, PkgName++"-1.0.0").
  