Updated java doc and JUnit tests