A sample of amniotic fluid can show whether a fetus has certain genetic disorders or infections. A test called an amniocentesis can take a sample of amniotic fluid with a needle and study it for problems.