anchor.diff:  garbage_in(doc) ->
       ["Test that the process handles garbage sent to it."];
   garbage_in(Config) when is_list(Config) ->
  -
  -    io:format("start note_store server~n", []),
  -    Prio = normal,
  -    Mod  = ?MODULE, 
  -    Opts = [{verbosity, trace}], 
  -    {ok, Pid} = snmp_note_store:start_link(Prio, Mod, Opts),
  -
  -    io:format("issue bad request~n", []),
  +    Pre = fun() ->
  +                  ?IPRINT("try start note-store"),
  +                  Prio = normal,
  +                  Mod  = ?MODULE, 
  +                  Opts = [{verbosity, trace}], 
  +                  case snmp_note_store:start_link(Prio, Mod, Opts) of
  +                      {ok, Pid} ->
  +                          ?IPRINT("note-store started: ~p", [Pid]),
  +                          Pid;
  +                      {error, Reason} ->
  +                          {skip, ?F("Failed starting note-store: ~p", [Reason])}
  +                  end
  +          end,
  +    Case = fun(State) -> do_garbage_in(State, Config) end,
  +    Post = fun(Pid) ->
  +                   ?IPRINT("attempt stop note-store"),
  +                   snmp_note_store:stop(Pid)
  +           end,
  +    ?TC_TRY(garbage_in, Pre, Case, Post).
  +
  +do_garbage_in(Pid, _Config) ->
  +
  +    ?IPRINT("issue bad request"),
       {error, _} = gen_server:call(Pid, bad_request),
   
  -    io:format("cast bad message~n", []),
  +    ?IPRINT("cast bad message"),
       gen_server:cast(Pid, bad_message),
       
  -    io:format("bang bad info~n", []),
  +    ?IPRINT("bang bad info"),
       Pid ! bad_info,
   
  -    io:format("verify note_Store server still alive and kicking~n", []),
  +    ?IPRINT("verify note-store server still alive and kicking"),
       Info = snmp_note_store:info(Pid),
       if
   	is_list(Info) andalso (length(Info) > 0) ->
  
positive.code:     ["Testing that it does what it is actually supposed to do, "
       "namilly to handle notes. "];
  notes(Config) when is_list(Config) ->
  
      {ok, Handler, Pid} = note_store_handler_start(),
  
      io:format("sleep some before we begin the tests~n", []),
      ?SLEEP(timer:seconds(1)), 
  
      %% Default lifetime is infinity. A note with lifetime
      %% infinity is permanent
      io:format("create permanent note sune~n", []),
      true = snmp_note_store:set_note(Pid, sune, 10), 
      10 = snmp_note_store:get_note(Pid, sune),
      10 = snmp_note_store:get_note(Pid, sune),
      
      %% Lifetime is in 1/100 sec ticks, so 500 equals 5 seconds
      io:format("create 5 sec note kalle~n", []),
      true = snmp_note_store:set_note(Pid, 500, kalle, hobbe), 
      io:format("wait 1 sec~n", []),
      ?SLEEP(timer:seconds(1)),
      io:format("get note kalle~n", []),
      hobbe = snmp_note_store:get_note(Pid, kalle),
      io:format("wait 5 sec~n", []),
      ?SLEEP(timer:seconds(5)),
      io:format("get note kalle again (now it should not exist)~n", []),
      undefined = snmp_note_store:get_note(Pid, kalle),
  
      io:format("create 5 sec note kalle~n", []),
      true = snmp_note_store:set_note(Pid, 500, kalle, hobbe), 
      io:format("wait 6 sec (to allow timer to clean up note)~n", []),
      ?SLEEP(timer:seconds(6)),
      io:format("get note kalle - should not exist~n", []),
      undefined = snmp_note_store:get_note(Pid, kalle),
  
      io:format("read the permanent note sune again~n", []),
      10 = snmp_note_store:get_note(Pid, sune),
  
      note_store_handler_stop(Handler),
  
      ok.
  
  
negative.code: %% 
  %% %CopyrightBegin%
  %% 
  %% Copyright Ericsson AB 2004-2020. All Rights Reserved.
  %% 
  %% Licensed under the Apache License, Version 2.0 (the "License");
  %% you may not use this file except in compliance with the License.
  