Added java docs + unit test