Added unit test for java version