I think this method may be testing too much, leading to fragile tests. How about:

  private void assertClassHasFailureMessage(Class<?> klass, String message);

...and have it fail if either there are no failure messages or if none of the messages match `message`.

Perhaps some of the callers would check for more than one error message by calling this twice, but that's better than hard-coding the number of error messages IMHO