### Question:
MigrationVersion { static MigrationVersion parse(String simpleName) { Matcher matcher = VERSION_PATTERN.matcher(simpleName); if (!matcher.matches()) { throw new MigrationsException("Invalid class name for a migration: " + simpleName); } return new MigrationVersion(matcher.group(1), matcher.group(2).replaceAll("_", " ")); } private  MigrationVersion(String value, String description); String getValue(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test void shouldFailOnIncorrectClassNames() { assertThatExceptionOfType(MigrationsException.class).isThrownBy(() -> MigrationVersion.parse("HalloWelt")); assertThatExceptionOfType(MigrationsException.class).isThrownBy(() -> MigrationVersion.parse("V1")); assertThatExceptionOfType(MigrationsException.class).isThrownBy(() -> MigrationVersion.parse("V1__")); assertThatExceptionOfType(MigrationsException.class).isThrownBy(() -> MigrationVersion.parse("V__HalloWelt")); assertThatExceptionOfType(MigrationsException.class).isThrownBy(() -> MigrationVersion.parse("V1_HalloWelt")); }