Fix string substitution in test exception message