public void Should_print_warn_msg_and_return_if_msg_is_expired() { // Arrange var routeFinder = Substitute.For <IRpcRouteFinder>(); var instance = Substitute.For <ISomeService>(); var server = new BurrowRpcServerCoordinator <ISomeService>(instance, routeFinder, "queue-connnection-string", "10"); var request = new RpcRequest { UtcExpiryTime = DateTime.UtcNow.AddSeconds(-10) }; // Action server.HandleMesage(request); // Assert Global.DefaultWatcher.Received(1).WarnFormat(Arg.Any <string>(), Arg.Any <object[]>()); tunnel.DidNotReceive().Publish(Arg.Any <RpcResponse>(), Arg.Any <string>()); }