add javadoc and test.