Change hooks functional test assertion because when built with Java6 the exception message set by the script is lost