Added java tests