@Override
    public TimeSlot apply(TimeSlot timeSlot, SegmentInMinutes segmentInMinutes) {

        int segmentInMinutesDuration = segmentInMinutes.value();
        Instant segmentStart = normalizeStart(timeSlot.from(), segmentInMinutesDuration);
        Instant segmentEnd = normalizeEnd(timeSlot.to(), segmentInMinutesDuration);
        TimeSlot normalized = new TimeSlot(segmentStart, segmentEnd);
        TimeSlot minimalSegment = new TimeSlot(segmentStart, segmentStart.plus(segmentInMinutes.value(), ChronoUnit.MINUTES));
        if (normalized.within(minimalSegment)) {
            return minimalSegment;
        }
        return normalized;
    }
@Test
    void noNormalizationWhenSlotStartsAtSegmentStart() {
        //given
        Instant start = Instant.parse("2023-09-09T00:15:00Z");
        Instant end = Instant.parse("2023-09-09T00:30:00Z");
        TimeSlot timeSlot = new TimeSlot(start, end);
        Instant start2 = Instant.parse("2023-09-09T00:30:00Z");
        Instant end2 = Instant.parse("2023-09-09T00:45:00Z");
        TimeSlot timeSlot2 = new TimeSlot(start2, end2);
        SegmentInMinutes fifteenMinutes = SegmentInMinutes.of(15, FIFTEEN_MINUTES_SEGMENT_DURATION);

        //when
        TimeSlot normalized = SLOT_TO_NORMALIZED_SLOT.apply(timeSlot, fifteenMinutes);
        TimeSlot normalized2 = SLOT_TO_NORMALIZED_SLOT.apply(timeSlot2, fifteenMinutes);

        //then
        assertEquals(Instant.parse("2023-09-09T00:15:00Z"), normalized.from());
        assertEquals(Instant.parse("2023-09-09T00:30:00Z"), normalized.to());
        assertEquals(Instant.parse("2023-09-09T00:30:00Z"), normalized2.from());
        assertEquals(Instant.parse("2023-09-09T00:45:00Z"), normalized2.to());
    }