### Question:
ImmutableMeasure implements Measure, ImmutableBean, Serializable { public static ImmutableMeasure of(String name) { return new ImmutableMeasure(name, true); } private  ImmutableMeasure(
      String name,
      boolean currencyConvertible); static ImmutableMeasure of(String name); static ImmutableMeasure of(String name, boolean isCurrencyConvertible); @Override String toString(); static ImmutableMeasure.Meta meta(); @Override ImmutableMeasure.Meta metaBean(); @Override String getName(); @Override boolean isCurrencyConvertible(); @Override boolean equals(Object obj); @Override int hashCode();  }### Answer:
@Test public void namePattern() { assertThatIllegalArgumentException().isThrownBy(() -> ImmutableMeasure.of(null)); assertThatIllegalArgumentException().isThrownBy(() -> ImmutableMeasure.of("")); assertThatIllegalArgumentException() .isThrownBy(() -> ImmutableMeasure.of("Foo Bar")) .withMessageMatching(".*must only contain the characters.*"); assertThatIllegalArgumentException() .isThrownBy(() -> ImmutableMeasure.of("Foo_Bar")) .withMessageMatching(".*must only contain the characters.*"); assertThatIllegalArgumentException() .isThrownBy(() -> ImmutableMeasure.of("FooBar!")) .withMessageMatching(".*must only contain the characters.*"); ImmutableMeasure.of("FooBar"); ImmutableMeasure.of("Foo-Bar"); ImmutableMeasure.of("123"); ImmutableMeasure.of("FooBar123"); }