public void SetsTheOutdatedApiVersionFlag() { var exception = new ApiDeprecatedException(request, response); ErrorHandlingService.TryHandleDeprecationError(Arg.Any <ApiDeprecatedException>()).Returns(true); ProgressSubject.OnError(exception); ErrorHandlingService.Received().TryHandleDeprecationError(Arg.Is(exception)); ErrorHandlingService.DidNotReceive().TryHandleUnauthorizedError(Arg.Is(exception)); }