fix Java tests