@Test
public void testXidEvent() {

  long xid = 88888L;
  eventHeader.setEventType(EventType.XID);
  XidEventData eventData = new XidEventData();
  eventData.setXid(xid);
  Optional<BinlogEvent> binlogEvent =
      BinaryLogConnectorEventMapper.INSTANCE.map(
          new Event(eventHeader, eventData), BINLOG_FILE_POS);
  assertTrue(binlogEvent.isPresent());
  assertTrue(binlogEvent.get() instanceof XidEvent);
  XidEvent xidEvent = (XidEvent) (binlogEvent.get());
  assertEquals(BINLOG_FILE_POS, xidEvent.getBinlogFilePos());
  assertEquals(SERVER_ID, xidEvent.getServerId());
  assertEquals(TIMESTAMP, xidEvent.getTimestamp());
  assertEquals(xid, xidEvent.getXid());
}