flink-connector-test-util/src/main/java/com/ververica/cdc/connectors/utils/AssertUtils.java
public static void assertDelete(SourceRecord record, boolean keyExpected) {
        if (keyExpected) {
            assertNotNull(record.key());
            assertNotNull(record.keySchema());
        } else {
            assertNull(record.key());
            assertNull(record.keySchema());
        }
        assertNotNull(record.valueSchema());
        Struct value = (Struct) record.value();
        assertNotNull(value);
        assertEquals(
                Envelope.Operation.DELETE.code(), value.getString(Envelope.FieldName.OPERATION));
        assertNotNull(value.get(Envelope.FieldName.BEFORE));
        assertNull(value.get(Envelope.FieldName.AFTER));
    }
/**
     * Verify that the given {@link SourceRecord} is a {@link Envelope.Operation#DELETE DELETE}
     * record.
     *
     * @param record the source record; may not be null
     */
Verify that the given  SourceRecord is a  Envelope.Operation#DELETE DELETE
record.

@param record the source record; may not be null
Verify that the given SourceRecord is a Envelope . Operation#DELETE DELETE record . @param record the source record ; may not be null
public static void assertDelete(SourceRecord record, boolean keyExpected) {
        if (keyExpected) {
            assertNotNull(record.key());
            assertNotNull(record.keySchema());
        } else {
            assertNull(record.key());
            assertNull(record.keySchema());
        }
        assertNotNull(record.valueSchema());
        Struct value = (Struct) record.value();
        assertNotNull(value);
        assertEquals(
                Envelope.Operation.DELETE.code(), value.getString(Envelope.FieldName.OPERATION));
        assertNotNull(value.get(Envelope.FieldName.BEFORE));
        assertNull(value.get(Envelope.FieldName.AFTER));
    }
public static void assertDelete ( SourceRecord record , boolean keyExpected ) { if ( keyExpected ) { assertNotNull ( record . key ( ) ) ; assertNotNull ( record . keySchema ( ) ) ; } else { assertNull ( record . key ( ) ) ; assertNull ( record . keySchema ( ) ) ; } assertNotNull ( record . valueSchema ( ) ) ; Struct value = ( Struct ) record . value ( ) ; assertNotNull ( value ) ; assertEquals ( Envelope . Operation . DELETE . code ( ) , value . getString ( Envelope . FieldName . OPERATION ) ) ; assertNotNull ( value . get ( Envelope . FieldName . BEFORE ) ) ; assertNull ( value . get ( Envelope . FieldName . AFTER ) ) ; }
Verify that the given {@link SourceRecord} is a {@link Envelope.Operation#DELETE DELETE}
 record.
Verify that the given { @link SourceRecord } is a { @link Envelope . Operation#DELETE DELETE } record .