### Question:
TimeToStringConverter extends StringConverter<LocalTime> { @Override public LocalTime fromString(final String timeText) { return LocalTime.from(TIME_PARSER.parse(timeText)); }  @Override String toString(final LocalTime time); @Override LocalTime fromString(final String timeText);  }### Answer:
@Test public void testFromStringSuccess() { assertEquals(LocalTime.of(0, 0), CONVERTER.fromString("0:0")); assertEquals(LocalTime.of(0, 0), CONVERTER.fromString("00:00")); assertEquals(LocalTime.of(0, 0), CONVERTER.fromString("24:0")); assertEquals(LocalTime.of(5, 5), CONVERTER.fromString("5:5")); assertEquals(LocalTime.of(23, 59), CONVERTER.fromString("23:59")); }
@Test public void testFromStringFailedInvalidTime() { assertThrows(DateTimeParseException.class, () -> CONVERTER.fromString("24:62")); }
@Test public void testFromStringFailedNoTime() { assertThrows(DateTimeParseException.class, () -> CONVERTER.fromString("foo:bar")); }
@Test public void testFromStringFailedNoMinutes() { assertThrows(DateTimeParseException.class, () -> CONVERTER.fromString("10:")); }