@Override
    protected Optional<OffsetDateTime> extractField(String s) {
        try {
            return Optional.of(OffsetDateTime.parse(s, formatter));
        } catch (DateTimeParseException e) {
            logger.log(Level.WARNING, e.getParsedString());
            logger.log(Level.WARNING, String.format("Unable to parse date/time %s with formatter %s", s, dateTimeFormat));
            return Optional.empty();
        }
    }
@Test
    public void testValidBehaviour() {
        String isoFormat = "uuuu-MM-dd HH:mmx";
        DateTimeFormatter isoFormatter = DateTimeFormatter.ofPattern(isoFormat, Locale.US);
        String isoInput = "1994-01-26 20:00+05";
        OffsetDateTimeExtractor isoExtractor = new OffsetDateTimeExtractor("test-iso", "date-iso", isoFormat);
        OffsetDateTime isoDate = OffsetDateTime.parse(isoInput, isoFormatter);
        Optional<OffsetDateTime> isoExtracted = isoExtractor.extractField(isoInput);
        assertTrue(isoExtracted.isPresent());
        assertEquals(isoDate,isoExtracted.get());

        String usFormat = "MM-dd-uuuu HH:mmx";
        DateTimeFormatter usFormatter = DateTimeFormatter.ofPattern(usFormat, Locale.US);
        String usInput = "09-08-1966 20:30+05";
        OffsetDateTimeExtractor usExtractor = new OffsetDateTimeExtractor("test-us", "date-us", usFormat);
        OffsetDateTime usDate = OffsetDateTime.parse(usInput, usFormatter);
        Optional<OffsetDateTime> usExtracted = usExtractor.extractField(usInput);
        assertTrue(usExtracted.isPresent());
        assertEquals(usDate,usExtracted.get());

        String ukFormat = "dd-MM-uuuu HH:mmx";
        DateTimeFormatter ukFormatter = DateTimeFormatter.ofPattern(ukFormat, Locale.US);
        String ukInput = "23-11-1963 17:16+00";
        OffsetDateTimeExtractor ukProc = new OffsetDateTimeExtractor("test-uk", "date-uk", ukFormat);
        OffsetDateTime ukDate = OffsetDateTime.parse(ukInput, ukFormatter);
        Optional<OffsetDateTime> ukExtracted = ukProc.extractField(ukInput);
        assertTrue(ukExtracted.isPresent());
        assertEquals(ukDate,ukExtracted.get());
    }