[Java] Print error stack trace when tests fail