fixed fragment attachment test code
added java docs