closed #5331: add a test for addParticle.