Optional<TimeRange> parse(final String shortTimerange) {
        if (shortTimerange != null && SHORT_FORMAT_PATTERN.matcher(shortTimerange).matches()) {
            final String numberPart = shortTimerange.substring(0, shortTimerange.length() - 1);
            final String periodPart = shortTimerange.substring(shortTimerange.length() - 1);
            String longPeriodPart = SHORT_TO_LONG_PERIOD_MAPPING.get(periodPart);
            if (longPeriodPart != null) {
                if ("1".equals(numberPart)) {
                    longPeriodPart = longPeriodPart.substring(0, longPeriodPart.length() - 1); //removing last "s"
                }
                return Optional.of(
                        KeywordRange.create(
                                "last " + numberPart + " " + longPeriodPart,
                                "UTC")
                );
            }
        }
        return Optional.empty();
    }
@Test
    void returnsEmptyOptionalOnNullInput() {
        assertThat(toTest.parse(null)).isEmpty();
    }