The natural BCs are not exact at the discrete level because the definition of the gradient in the BC depends on the discretization. You should see that the agreement gets much better if you increase the mesh resolution.

Thanks for your reply, it is true that by refining the mesh i m getting closer to the exact value but there is always an error.

I m working on flow simulation and i was afraid that my mass conservation equation was not respected (incoming flow was a bit different from the outflow) even with a fine mesh.

It is true that there is always an error. However, you should note that your test is also not exact, since it depends on the approximation of the derivative.