### Question:
Percentage { public static Percentage fromString(final String str) { checkArgument(str != null); return fromInt(parseInt(str)); } private  Percentage(final int value); static Percentage fromString(final String str); static Percentage fromInt(final int val); int getValue(); float getValueAsFloat(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void assertThatAPercentageCannotBeBuiltFromAnInvalidString() { final Throwable thrown = catchThrowable(() -> Percentage.fromString("not a percentage")); assertThat(thrown).isInstanceOf(IllegalArgumentException.class); }