@Test
public void testDeleteEvent() {

  eventHeader.setEventType(EventType.EXT_DELETE_ROWS);
  DeleteRowsEventData eventData = new DeleteRowsEventData();
  eventData.setTableId(TABLE_ID);
  eventData.setRows(ImmutableList.of(PREV_ROW));
  Optional<BinlogEvent> binlogEvent =
      BinaryLogConnectorEventMapper.INSTANCE.map(
          new Event(eventHeader, eventData), BINLOG_FILE_POS);
  assertTrue(binlogEvent.isPresent());
  assertTrue(binlogEvent.get() instanceof DeleteEvent);
  DeleteEvent deleteEvent = (DeleteEvent) (binlogEvent.get());
  assertEquals(BINLOG_FILE_POS, deleteEvent.getBinlogFilePos());
  assertEquals(ImmutableList.of(PREV_ROW), deleteEvent.getRows());
  assertEquals(SERVER_ID, deleteEvent.getServerId());
  assertEquals(TABLE_ID, deleteEvent.getTableId());
  assertEquals(TIMESTAMP, deleteEvent.getTimestamp());
}