anchor.diff:        , ?_assertThrow( { timeout, _ }, get_event( Port, "SomeEvent" ) ) }
       , { "stop driver" , ?_assertEqual( ok, stop_driver( Port ) ) }
       ].
  +
  +stop_idempotent_test_() ->
  +    { ok, Port } = start_test_driver( "echo.sh" ),
  +    Tries = 2,
  +    [ { lists:flatten( io_lib:format( "stop ~B", [ Try ] ) ),
  +        ?_assertEqual( ok, stop_driver( Port ) ) }
  +      || Try <- lists:seq( 1, Tries ) ].
   
   
   % server tests - API
  
positive.code:         error:Error -> { error, Error }
      end.
  
  
  -spec stop_driver( port() ) -> ok.
  stop_driver( Port ) ->
      { os_pid, Pid } = erlang:port_info( Port, os_pid ),
      erlang:port_close( Port ),
      % TODO - give the driver some time to finish cleanly
      case lurch_os:is_os_process_alive( Pid ) of
          true -> lurch_os:kill_os_process(9, Pid),
  
negative.code:     { noreply, State }.
  
  
  terminate( _Reason, State ) ->
      stop_driver( State#state.port ).
  
  
  code_change( _OldVsn, State, _Extra ) ->
  