[test] Add test for Java version generation