// 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.LocalDate;
import java.time.format.DateTimeParseException;
    private static final String correctFormatDate1 = "2017-10-25";
    private static final String correctFormatDate2 = "2010-12-01";

    @Test
    void parse() {
        Assertions.assertEquals(date1, FilterParser.ofDate().parse(correctFormatDate1));
        Assertions.assertEquals(date2, FilterParser.ofDate().parse(correctFormatDate2));
    }

    @Test
    void parseThrows() {
        Assertions.assertThrows(DateTimeParseException.class, () -> FilterParser.ofDate().parse("2017-04-06  "));
        Assertions.assertThrows(DateTimeParseException.class, () -> FilterParser.ofDate().parse("2017-04"));
        Assertions.assertThrows(DateTimeParseException.class, () -> FilterParser.ofDate().parse("2017"));
        Assertions.assertThrows(DateTimeParseException.class, () -> FilterParser.ofDate().parse("O"));
        Assertions.assertThrows(DateTimeParseException.class, () -> FilterParser.ofDate().parse(" 5   "));
    }

    @Test
    void parseWithApiException() {
        Assertions.assertEquals(date1, FilterParser.ofDate().parseWithApiException(correctFormatDate1));
        Assertions.assertEquals(date2, FilterParser.ofDate().parseWithApiException(correctFormatDate2));
    }

    @Test
    void parseWithApiExceptionThrows() {
        Assertions.assertThrows(FilteringApiException.class, () -> FilterParser.ofDate().parseWithApiException("2017-04-06  "));
        Assertions.assertThrows(FilteringApiException.class, () -> FilterParser.ofDate().parseWithApiException("2017-04"));
        Assertions.assertThrows(FilteringApiException.class, () -> FilterParser.ofDate().parseWithApiException("2017"));
        Assertions.assertThrows(FilteringApiException.class, () -> FilterParser.ofDate().parseWithApiException("O"));
// 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/FilterParserLocalDateTest.java
import org.blackdread.filtersortjooqapi.exception.FilteringApiException;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import java.time.LocalDate;
import java.time.format.DateTimeParseException;

    private static final String correctFormatDate1 = "2017-10-25";
    private static final String correctFormatDate2 = "2010-12-01";

    @Test
    void parse() {
        Assertions.assertEquals(date1, FilterParser.ofDate().parse(correctFormatDate1));
        Assertions.assertEquals(date2, FilterParser.ofDate().parse(correctFormatDate2));
    }

    @Test
    void parseThrows() {
        Assertions.assertThrows(DateTimeParseException.class, () -> FilterParser.ofDate().parse("2017-04-06  "));
        Assertions.assertThrows(DateTimeParseException.class, () -> FilterParser.ofDate().parse("2017-04"));
        Assertions.assertThrows(DateTimeParseException.class, () -> FilterParser.ofDate().parse("2017"));
        Assertions.assertThrows(DateTimeParseException.class, () -> FilterParser.ofDate().parse("O"));
        Assertions.assertThrows(DateTimeParseException.class, () -> FilterParser.ofDate().parse(" 5   "));
    }

    @Test
    void parseWithApiException() {
        Assertions.assertEquals(date1, FilterParser.ofDate().parseWithApiException(correctFormatDate1));
        Assertions.assertEquals(date2, FilterParser.ofDate().parseWithApiException(correctFormatDate2));
    }

    @Test
    void parseWithApiExceptionThrows() {
        Assertions.assertThrows(FilteringApiException.class, () -> FilterParser.ofDate().parseWithApiException("2017-04-06  "));
        Assertions.assertThrows(FilteringApiException.class, () -> FilterParser.ofDate().parseWithApiException("2017-04"));
        Assertions.assertThrows(FilteringApiException.class, () -> FilterParser.ofDate().parseWithApiException("2017"));
        Assertions.assertThrows(FilteringApiException.class, () -> FilterParser.ofDate().parseWithApiException("O"));
        Assertions.assertThrows(FilteringApiException.class, () -> FilterParser.ofDate().parseWithApiException(" 5   "));