public async Task CheckAccessRefreshToken_RefreshTokenDateNotCorrect_ReturnFalse() { //Arrange string refresh = "PeaIvTHLbjgGRd2lQAXhLK85TkGI4En9GJ7mHThT8DmyzWA/C4y8aOKqqYXUqxL3qxdPih2WhB2YQ2tqZZJG7hDavGdLgHoW8ZGAVc84MqdDTaDOr0gHZVJgvPyp5Wl7FPZP7q3fh7MYRfTaTzMZSqooADcErb4CdgyEFrlAb8o="; mockRefreshRepository .Setup(p => p.FindByRefreshTokenAsync(refresh)) .ReturnsAsync(new RefreshToken()); var tokenGeneratorService = new Mock <TokenGeneratorService>(); var services = new TokenService(mockRefreshRepository.Object, mockUsersRepository.Object, tokenGeneratorService.Object); //Act var result = await services.CheckAccessRefreshTokenAsync(refresh); //Assert Assert.False(result.CheckRefreshToken); }