anchor.diff:      ?assertEqual(CompileLockData1, CompileLockData2),
       ?assertEqual(CompileLockData1, UpgradeLockData).
   
  +umbrella_config(Config) ->
  +    apply(?config(mock, Config), []),
  +    {ok, TopConfig} = file:consult(?config(rebarconfig, Config)),
  +    %% Install dependencies before re-mocking for an upgrade
  +    rebar_test_utils:run_and_check(Config, TopConfig, ["lock"], {ok, []}),
  +    {App, Unlocks} = ?config(expected, Config),
  +    ct:pal("Upgrades: ~p -> ~p", [App, Unlocks]),
  +    Expectation = case Unlocks of
  +        {error, Term} -> {error, Term};
  +        _ -> {ok, Unlocks}
  +    end,
  +
  +    meck:new(rebar_prv_upgrade, [passthrough]),
  +    meck:expect(rebar_prv_upgrade, do, fun(S) ->
  +                                               apply(?config(mock_update, Config), []),
  +                                               meck:passthrough([S])
  +                                       end),
  +    _NewRebarConf = rebar_test_utils:create_config(filename:dirname(?config(rebarumbrella, Config)),
  +                                                   [{deps, ?config(next_top_deps, Config)}]),
  +    %% re-run from the top-level with the old config still in place;
  +    %% detection must happen when going for umbrella apps!
  +    rebar_test_utils:run_and_check(
  +        Config, TopConfig, ["upgrade", App], Expectation
  +     ),
  +    meck:unload(rebar_prv_upgrade).
  +
   run(Config) ->
       apply(?config(mock, Config), []),
  -    {ok, RebarConfig} = file:consult(?config(rebarconfig, Config)),
  +    ConfigPath = ?config(rebarconfig, Config),
  +    {ok, RebarConfig} = file:consult(ConfigPath),
       %% Install dependencies before re-mocking for an upgrade
       rebar_test_utils:run_and_check(Config, RebarConfig, ["lock"], {ok, []}),
       {App, Unlocks} = ?config(expected, Config),
  
positive.code:                                                apply(?config(mock_update, Config), []),
                                                 meck:passthrough([S])
                                         end),
      NewRebarConf = rebar_test_utils:create_config(?config(apps, Config),
                                                    [{deps, ?config(next_top_deps, Config)}]),
      {ok, NewRebarConfig} = file:consult(NewRebarConf),
      rebar_test_utils:run_and_check(
  
negative.code:      [],
       {"", [{"A","1"}, "D", "J", "E", {"I","1"},
             {"B","1"}, "F", "G",
             {"C","1"}, "H"]}};
  upgrades(umbrella_config) ->
      {[{"A", "1", []}],
       [{"A", "2", []}],
       ["A"],
       {"A", [{"A","2"}]}}.
  
  %% TODO: add a test that verifies that unlocking files and then
  %% running the upgrade code is enough to properly upgrade things.
  