// Path: src/main/java/org/blackdread/filtersortjooqapi/exception/FilteringApiException.java
// public class FilteringApiException extends BadUsageApiException {
// 
//     public FilteringApiException(final String message) {
//         super(message);
//     }
// }


import org.blackdread.filtersortjooqapi.exception.FilteringApiException;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import java.time.LocalTime;
import java.time.format.DateTimeParseException;
    private static final String correctFormatTime1 = "14:46";
    private static final String correctFormatTime2 = "10:30:45";
    private static final String correctFormatTime3 = "10:30:45.000001233";

    @Test
    void parse() {
        Assertions.assertEquals(time1, FilterParser.ofTime().parse(correctFormatTime1));
        Assertions.assertEquals(time2, FilterParser.ofTime().parse(correctFormatTime2));
        Assertions.assertEquals(time3, FilterParser.ofTime().parse(correctFormatTime3));
    }

    @Test
    void parseThrows() {
        Assertions.assertThrows(DateTimeParseException.class, () -> FilterParser.ofTime().parse("12 43"));
        Assertions.assertThrows(DateTimeParseException.class, () -> FilterParser.ofTime().parse("12:23 45"));
        Assertions.assertThrows(DateTimeParseException.class, () -> FilterParser.ofTime().parse("Odwdw0"));
        Assertions.assertThrows(DateTimeParseException.class, () -> FilterParser.ofTime().parse("O"));
        Assertions.assertThrows(DateTimeParseException.class, () -> FilterParser.ofTime().parse("87"));
        Assertions.assertThrows(DateTimeParseException.class, () -> FilterParser.ofTime().parse(" 5   "));
    }

    @Test
    void parseWithApiException() {
        Assertions.assertEquals(time1, FilterParser.ofTime().parseWithApiException(correctFormatTime1));
        Assertions.assertEquals(time2, FilterParser.ofTime().parseWithApiException(correctFormatTime2));
        Assertions.assertEquals(time3, FilterParser.ofTime().parseWithApiException(correctFormatTime3));
    }

    @Test
    void parseWithApiExceptionThrows() {
// Path: src/main/java/org/blackdread/filtersortjooqapi/exception/FilteringApiException.java
// public class FilteringApiException extends BadUsageApiException {
// 
//     public FilteringApiException(final String message) {
//         super(message);
//     }
// }


// Path: src/test/java/org/blackdread/filtersortjooqapi/filter/parser/FilterParserLocalTimeTest.java
import org.blackdread.filtersortjooqapi.exception.FilteringApiException;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import java.time.LocalTime;
import java.time.format.DateTimeParseException;

    private static final String correctFormatTime1 = "14:46";
    private static final String correctFormatTime2 = "10:30:45";
    private static final String correctFormatTime3 = "10:30:45.000001233";

    @Test
    void parse() {
        Assertions.assertEquals(time1, FilterParser.ofTime().parse(correctFormatTime1));
        Assertions.assertEquals(time2, FilterParser.ofTime().parse(correctFormatTime2));
        Assertions.assertEquals(time3, FilterParser.ofTime().parse(correctFormatTime3));
    }

    @Test
    void parseThrows() {
        Assertions.assertThrows(DateTimeParseException.class, () -> FilterParser.ofTime().parse("12 43"));
        Assertions.assertThrows(DateTimeParseException.class, () -> FilterParser.ofTime().parse("12:23 45"));
        Assertions.assertThrows(DateTimeParseException.class, () -> FilterParser.ofTime().parse("Odwdw0"));
        Assertions.assertThrows(DateTimeParseException.class, () -> FilterParser.ofTime().parse("O"));
        Assertions.assertThrows(DateTimeParseException.class, () -> FilterParser.ofTime().parse("87"));
        Assertions.assertThrows(DateTimeParseException.class, () -> FilterParser.ofTime().parse(" 5   "));
    }

    @Test
    void parseWithApiException() {
        Assertions.assertEquals(time1, FilterParser.ofTime().parseWithApiException(correctFormatTime1));
        Assertions.assertEquals(time2, FilterParser.ofTime().parseWithApiException(correctFormatTime2));
        Assertions.assertEquals(time3, FilterParser.ofTime().parseWithApiException(correctFormatTime3));
    }

    @Test
    void parseWithApiExceptionThrows() {
        Assertions.assertThrows(FilteringApiException.class, () -> FilterParser.ofTime().parseWithApiException("12 43"));