Microscopic derivation of zero-flux boundary condition in one-dimensional random walk in presence of a totally reflecting barrier