add Java test cases