### Question:
IdentifierValidationUtil { public static void validateTestName(final String testName) { final Matcher m = VALID_TEST_NAME_PATTERN.matcher(testName); if (!m.matches()) { throw new IllegalArgumentException("Test Name must be alpha-numeric underscore and not start/end with a number, found: '" + testName + "'"); } if (testName.length() > TEST_NAME_LENGTH_LIMIT) { throw new IllegalArgumentException("Test Name length can't be longer than " + TEST_NAME_LENGTH_LIMIT + ", found: " + testName.length()); } }  static void validateMetaTags(final TestDefinition definition); static void validateTestName(final String testName); static boolean isValidBucketName(final String bucketName);  }### Answer:
@Test public void testValidateTestName() { final String maxLengthName = StringUtils.repeat("a", 100); final String tooLongName = StringUtils.repeat("a", 101); for (final String input : new String[]{"", "0", "_", "__", ".", "_0", "0_", "a_0", "0_a", "a#b"}) { assertThatThrownBy(() -> validateTestName(input)) .isInstanceOf(IllegalArgumentException.class) .hasMessageContaining("Test Name must be alpha-numeric underscore and not start/end with a number"); } assertThatThrownBy(() -> validateTestName(tooLongName)) .isInstanceOf(IllegalArgumentException.class) .hasMessageContaining("Test Name length can't be longer than 100"); assertThat(Arrays.asList( "a", "A", "a_a", "a1a", "_0_", "_0___", "_a_b_", "_a", "a_", maxLengthName )).allSatisfy(IdentifierValidationUtil::validateTestName); }