Let $A$ be a commutative ring with unit endowed with $I$-adic topology where $I$ is the ideal of $A$. Let $\hat A$ be the formal completion of $A$ for the $I$-adic topology, and $M$ an $A$-module. Let $\hat M$ be the formal completion of $A$ for the $I$-adic topology. I know that if $A$ is Noetherian ring and $M$ a finitely generated $A$-module then Artin–Rees lemma gives that $M\otimes_A\hat{A}\to \hat{M}$ is an isomorphism.
But how can I choose $A$ and $M$ such that $M\otimes_A\hat{A}\to \hat{M}$ is not surjective? And similarly, how can I choose $A$ and $M$ such that $M\otimes_A\hat{A}\to \hat{M}$ is not injective?
Qing Liu, Algebraic Geometry and Arithmetic Curves exercise 1.3.4.