@Test
public void testParsePK() {

    TableMeta tableMeta = Mockito.mock(TableMeta.class);
    Mockito.when(tableMeta.getPkName()).thenReturn("id");
    Mockito.when(tableMeta.getTableName()).thenReturn("table_name");
    TableRecords beforeImage = new TableRecords();
    beforeImage.setTableName("table_name");
    beforeImage.setTableMeta(tableMeta);
    List<Row> beforeRows = new ArrayList<>();
    Row row0 = new Row();
    Field field01 = addField(row0, "id", 1, "12345");
    Field field02 = addField(row0, "age", 1, "2");
    beforeRows.add(row0);
    Row row1 = new Row();
    Field field11 = addField(row1, "id", 1, "12346");
    Field field12 = addField(row1, "age", 1, "2");
    beforeRows.add(row1);
    beforeImage.setRows(beforeRows);
    SQLUndoLog sqlUndoLog = new SQLUndoLog();
    sqlUndoLog.setSqlType(SQLType.UPDATE);
    sqlUndoLog.setTableMeta(tableMeta);
    sqlUndoLog.setTableName("table_name");
    sqlUndoLog.setBeforeImage(beforeImage);
    sqlUndoLog.setAfterImage(null);
    TestUndoExecutor executor = new TestUndoExecutor(sqlUndoLog, true);
    Object[] pkValues = executor.parsePkValues(beforeImage);
    Assertions.assertEquals(2, pkValues.length);
}