source: class BinaryLogConnectorEventMapperTest {
  
    private static final long TABLE_ID;
    private static final long SERVER_ID;
    private static final long TIMESTAMP;
    private static final String DATABASE;
    private static final String TABLE;
    private static final BinlogFilePos BINLOG_FILE_POS;
    private static final Serializable[] ROW;
    private static final Serializable[] PREV_ROW;
    private EventHeaderV4 eventHeader;
  
    @Test
    public void testWriteEvent() {
  
target:     eventHeader.setEventType(EventType.EXT_WRITE_ROWS);
      WriteRowsEventData eventData = new WriteRowsEventData();
      eventData.setTableId(TABLE_ID);
      eventData.setRows(ImmutableList.of(ROW));
  
      Optional<BinlogEvent> binlogEvent =
          BinaryLogConnectorEventMapper.INSTANCE.map(
              new Event(eventHeader, eventData), BINLOG_FILE_POS);
      assertTrue(binlogEvent.isPresent());
      assertTrue(binlogEvent.get() instanceof WriteEvent);
      WriteEvent writeEvent = (WriteEvent) (binlogEvent.get());
      assertEquals(BINLOG_FILE_POS, writeEvent.getBinlogFilePos());
      assertEquals(ImmutableList.of(ROW), writeEvent.getRows());
      assertEquals(SERVER_ID, writeEvent.getServerId());
      assertEquals(TABLE_ID, writeEvent.getTableId());
      assertEquals(TIMESTAMP, writeEvent.getTimestamp());
    }
  
  }