code: public static <T extends Exception> org.hamcrest.Matcher<T> hasMessage(
              String expectedMessage) {
          return new ExceptionMessageMatcher<>(expectedMessage);
      }
docs: EXAMPLE:
  <code>assertThat(caughtException(), hasMessage("Index: 9, Size: 9"));</code>
  
  @param <T>
  the exception subclass
  @param expectedMessage
  the expected exception message
  @return Returns a matcher that matches an exception if it has the given
  message.