### Question:
LoaderUtils { public static LocalTime parseTime(String str) { try { return LocalTime.parse(str, HH_MM_SS_COLON); } catch (DateTimeParseException ex) { throw new IllegalArgumentException( "Unknown time format, must be formatted as 'HH', 'HH:mm', 'HH:mm:ss' or 'HH:mm:ss.SSS' but was: " + str); } } private  LoaderUtils(); static Index findIndex(String reference); static boolean parseBoolean(String str); static int parseInteger(String str); static double parseDouble(String str); static double parseDoublePercent(String str); static BigDecimal parseBigDecimal(String str); static BigDecimal parseBigDecimalPercent(String str); static LocalDate parseDate(String str, DateTimeFormatter... formatters); static LocalDate parseDate(String str); static YearMonth parseYearMonth(String str); static LocalTime parseTime(String str); static ZoneId parseZoneId(String str); static Period parsePeriod(String str); static Tenor parseTenor(String str); static Optional<Tenor> tryParseTenor(String str); static Frequency parseFrequency(String str); static Currency parseCurrency(String str); static Optional<Currency> tryParseCurrency(String str); static DayCount parseDayCount(String str); static BusinessDayConvention parseBusinessDayConvention(String str); static RollConvention parseRollConvention(String str); static BuySell parseBuySell(String str); static PayReceive parsePayReceive(String str); static PutCall parsePutCall(String str); static LongShort parseLongShort(String str); static final String DEFAULT_TRADE_SCHEME; static final String DEFAULT_POSITION_SCHEME; static final String DEFAULT_SECURITY_SCHEME; }### Answer:
@Test public void test_parseTime() { assertThat(LoaderUtils.parseTime("2")).isEqualTo(LocalTime.of(2, 0)); assertThat(LoaderUtils.parseTime("11")).isEqualTo(LocalTime.of(11, 0)); assertThat(LoaderUtils.parseTime("11:30")).isEqualTo(LocalTime.of(11, 30)); assertThat(LoaderUtils.parseTime("11:30:20")).isEqualTo(LocalTime.of(11, 30, 20)); assertThat(LoaderUtils.parseTime("11:30:20.123")).isEqualTo(LocalTime.of(11, 30, 20, 123_000_000)); assertThatIllegalArgumentException().isThrownBy(() -> LoaderUtils.parseTime("Rubbish")); }