### Question:
Percentage { public static Percentage fromInt(final int val) { checkArgument(val >= 0 && val <= 100); return new Percentage(val); } 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 assertThatAPercentageCannotBeBuiltFromAnInvalidInt() { final Throwable thrown = catchThrowable(() -> Percentage.fromInt(120)); assertThat(thrown).isInstanceOf(IllegalArgumentException.class); }