public static Time parseTime(final String str) {
    try {
      return new Time(LocalTime.parse(str).toNanoOfDay() / 1000000);
    } catch (DateTimeParseException e) {
      throw new KsqlException("Failed to parse time '" + str
          + "': " + e.getMessage()
          + TIME_HELP_MESSAGE,
          e
      );
    }
  }
@Test
  public void shouldNotParseTime() {
    // When:
    final KsqlException e = assertThrows(
        KsqlException.class,
        () -> SqlTimeTypes.parseTime("foo")
    );

    // Then
    assertThat(e.getMessage(), containsString(
        "Required format is: \"HH:mm:ss.SSS\""));
  }