add JavaAPI test
refine comments