Fix Java test