File closing in tests fixed.
JavaDoc cosmetics.