public void UserManagementLogic_UserExists_RepositoryReturnsNull_ReturnsFalse() { Mock <IConfigurationRepository> configurationRepository = new Mock <IConfigurationRepository>(); configurationRepository.Setup(x => x.Get <AuthenticablePrincipal>(It.IsAny <Guid>())).Returns((AuthenticablePrincipal)null); UserManagementLogic userManagementLogic = new UserManagementLogic(configurationRepository.Object, new AuthorizeInitialSetup(configurationRepository.Object)); bool result = userManagementLogic.UserExists(Guid.NewGuid()); Assert.IsFalse(result); }