public boolean onOlderSegment(LogOffsetMetadata that) {
        if (messageOffsetOnly() || that.messageOffsetOnly())
            return false;
        return this.segmentBaseOffset < that.segmentBaseOffset;
    }
@Test
    void testOnOlderSegment() {
        LogOffsetMetadata metadata1 = new LogOffsetMetadata(1L, 0L, 1);
        LogOffsetMetadata metadata2 = new LogOffsetMetadata(5L, 4L, 2);
        LogOffsetMetadata messageOnlyMetadata = new LogOffsetMetadata(1L);
        assertFalse(UNKNOWN_OFFSET_METADATA.onOlderSegment(UNKNOWN_OFFSET_METADATA));
        assertFalse(metadata1.onOlderSegment(messageOnlyMetadata));
        assertFalse(messageOnlyMetadata.onOlderSegment(metadata1));
        assertFalse(metadata1.onOlderSegment(metadata1));
        assertFalse(metadata2.onOlderSegment(metadata1));
        assertTrue(metadata1.onOlderSegment(metadata2));
    }