anchor.diff:  -record(test_state, {known_vips = sets:new()}).
   
   stop() ->
  -  gen_server:call(?MODULE, clear).
  +  gen_server:call(?MODULE, clear),
  +  gen_server:stop(?MODULE).
   
   proper_test() ->
     [] = proper:module(?MODULE).
  
positive.code:   random:seed(erlang:phash2([node()]),
                erlang:monotonic_time(),
                erlang:unique_integer()),
    ets:new(connection_ewma, [{keypos, #backend.ip_port}, named_table]),
    {ok, #state{}}.
  
  %%--------------------------------------------------------------------
  
negative.code:          {call, ?MODULE, set_pending, [ip_port()]}] ++
          [{call, ?MODULE, pick_backend, [list(oneof(Vips))]} || VipsPresent]).
  
  state_test() ->
    TestTuple = {{1, 2, 3, 4}, 5000},
    {ok, State} = init([]),
    ?assertEqual([], ets:lookup(connection_ewma, TestTuple)),
    {noreply, State} = handle_cast({set_pending, TestTuple}, State),
    ?assertNotEqual([], ets:lookup(connection_ewma, TestTuple)),
    Backend = get_ewma_or_default(TestTuple),
    EWMA = Backend#backend.ewma,
    ?assertEqual(1, EWMA#ewma.pending),
    ets:delete(connection_ewma).
  -endif.
  