@Test void parseShouldThrowWhenMissingAmountWithExtraWhiteSpace() { assertThatThrownBy(() -> DurationParser.parse(" seconds")) .isInstanceOf(NumberFormatException.class); }
public static Duration parse(String rawString) throws NumberFormatException { return parse(rawString, ChronoUnit.MILLIS); }
DurationParser { public static Duration parse(String rawString) throws NumberFormatException { return parse(rawString, ChronoUnit.MILLIS); } }
DurationParser { public static Duration parse(String rawString) throws NumberFormatException { return parse(rawString, ChronoUnit.MILLIS); } private  DurationParser(); }
DurationParser { public static Duration parse(String rawString) throws NumberFormatException { return parse(rawString, ChronoUnit.MILLIS); } private  DurationParser(); static Duration parse(String rawString); static Duration parse(String rawString, ChronoUnit defaultUnit); }
DurationParser { public static Duration parse(String rawString) throws NumberFormatException { return parse(rawString, ChronoUnit.MILLIS); } private  DurationParser(); static Duration parse(String rawString); static Duration parse(String rawString, ChronoUnit defaultUnit);  }