anchor.diff:      UserInfo3 = #{uid => UserId3},
       CredState = <<"some_cred">>,
       Cred = <<"secret">>,
  -    MeckModules = [tts_data_sqlite, tts_cred_sup, tts_cred_worker],
  +    MeckModules = [tts_data_sqlite, tts_cred_sup, tts_cred_worker, tts_service],
       Token = #{},
       Params = [],
       MyPid = self(),
  -    AddFun = fun(User, Service, State) ->
  +    Interface = <<"test interface">>,
  +    AddFun = fun(User, Service, IFace, State) ->
  +                     IFace = Interface,
                        User = UserId1,
                        Service = ServiceId,
                        State = CredState,
  
positive.code:     UserInfo3 = #{uid => UserId3},
      UserInfo4 = #{uid => UserId4},
      CredState = <<"some_cred">>,
      Cred = <<"secret">>,
      MeckModules = [tts_data_sqlite, tts_cred_sup, tts_cred_worker],
      MyPid = self(),
      GetFun = fun(UserId) ->
                       case UserId of
                           UserId1 -> {ok, [{ServiceId, CredState}]};
                           UserId2 -> {ok, [{ServiceId, CredState}]};
                           UserId3 -> {ok, [{ServiceId, CredState}]};
                           _ -> {ok, []}
                       end
               end,
      DelFun = fun(UserId, Service, State) ->
                       Service = ServiceId,
                       State = CredState,
                       case UserId of
                           UserId1 -> ok;
                           UserId2 -> ok;
  
negative.code:     ok = meck:expect(tts_data_sqlite, credential_add, AddFun),
      ok = meck:expect(tts_cred_sup, new_worker, fun() -> {ok, MyPid} end),
      ok = meck:expect(tts_cred_worker, request, RequestFun),
      ok = meck:expect(tts_service, is_enabled, fun(_) -> true end),
  
  
      {ok, Pid} = tts_credential:start_link(),
      {ok, Cred, []} = tts_credential:request(ServiceId, UserInfo1, Interface,
                                              Token, Params),
      {error, {script, <<>>}, []} = tts_credential:request(ServiceId, UserInfo2,
                                                           Interface, Token, Params),
      {error, {internal, just_because}, []} = tts_credential:request(ServiceId,
                                                                     UserInfo3,
                                                                     Interface,
                                                                     Token, Params),
      ok = tts_credential:stop(),
      ok = test_util:wait_for_process_to_die(Pid,100),
      ok = test_util:meck_done(MeckModules),
      ok.
  
  revoke_test() ->
      CredId1 = <<"some credential id1">>,
      CredId2 = <<"some credential id2">>,
      CredId3 = <<"some credential id3">>,
      CredId4 = <<"some credential id4">>,
      CredId5 = <<"some credential id5">>,
      ServiceId = <<"ssh">>,
      UserId1 = <<"foo">>,
      UserId2 = <<"bar">>,
      UserId3 = <<"joe">>,
  