@ParameterizedTest
    @MethodSource("nonExceptionalData")
    public void shouldCreateNewWithRecord(final TestCase testCase) {
        if (testCase.records.size() != 1) {
            return;
        }

        final SegmentValue segmentValue = RocksDBVersionedStoreSegmentValueFormatter.newSegmentValueWithRecord(
            testCase.records.get(0).value,
            testCase.records.get(0).timestamp,
            testCase.nextTimestamp);

        verifySegmentContents(segmentValue, testCase);
    }
These scenarios may only be hit in the event of an earlier exception, such as failure to
write to a particular segment store of {@link RocksDBVersionedStore} resulting in an
inconsistency among segments. These tests verify that the store is able to recover
gracefully even if this happens.
streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBVersionedStoreSegmentValueFormatterTest.java