anchor.diff:                         ?NS:heartbeat(?NODE),
                          heartbeat_step(?NODE, ?HB_INTERVAL, 3),
                          ?NS:aborted(?NODE),
  -                       ?ASSERT_UP(?NODE)
  +                       ?ASSERT_AVAILABLE(?NODE)
                  end}
         end,
         fun(_) ->
  
positive.code:               {"Start it up, send hb, sleep, check state until we drive it into 'up'",
                 fun() ->
                         ?NS:heartbeat(?NODE),
                         ?ASSERT_IDLE(?NODE),
                         timer:sleep(?HB_INTERVAL),
  
                         %% Drive it up
                         heartbeat_step(?NODE, ?HB_INTERVAL, 3),
                         ?NS:aborted(?NODE),
                         ?ASSERT_UP(?NODE)
                 end}
        end,
        fun(_) ->
                {"Start it up, send hb, sleep, check state until we drive it into 'up', then wait until it goes down",
                 fun() ->
                         ?NS:heartbeat(?NODE),
                         ?ASSERT_IDLE(?NODE),
                         timer:sleep(?HB_INTERVAL),
  
                         %% Drive it up
                         heartbeat_step(?NODE, ?HB_INTERVAL, 3),
                         ?NS:aborted(?NODE),
                         ?ASSERT_UP(?NODE),
  
                         %% Drive it down, scan, then wait a moment and check
                         timer:sleep(?HB_INTERVAL*7),
                         pushy_node_stats:scan(),
                         timer:sleep(?HB_INTERVAL),
                         ?ASSERT_DOWN(?NODE)
                 end}
        end
       ]}.
  
negative.code: 
  -include_lib("eunit/include/eunit.hrl").
  
  -define(ASSERT_AVAILABLE(Node), ?assertMatch({online, {available, _}}, ?NS:status(Node)) ).
  -define(ASSERT_UNAVAILABLE(Node), ?assertMatch({online, {unavailable, _}}, ?NS:status(Node)) ).
  -define(ASSERT_OFFLINE(Node), ?assertMatch({offline, {unavailable, _}}, ?NS:status(Node)) ).
  
  basic_setup() ->
      test_util:start_apps(),
  