add validation test in java (back)