public virtual void addCandidateUserWithAuthenticatedTenant() { identityService.SetAuthentication("aUserId", null, new List <string>() { TENANT_ONE }); taskService.AddCandidateUser(task.Id, "demo"); // then Assert.That(taskService.CreateTaskQuery() //.TaskCandidateUser("demo") .Count(), Is.EqualTo(1L)); }