Added java unit test