fixed issues related to java unit tests.