Added tests to java stuff