### Question:
HBaseEventPublisher implements EventPublisher { @Override public void publishEvent(byte[] row, byte[] payload) throws IOException { Put eventPut = new Put(row); eventPut.addColumn(payloadColumnFamily, payloadColumnQualifier, payload); payloadTable.put(eventPut); } HBaseEventPublisher(HTableInterface payloadTable, byte[] payloadColumnFamily, byte[] payloadColumnQualifier); @Override void publishEvent(byte[] row, byte[] payload);  }### Answer:
@Test public void testPublishEvent() throws IOException { byte[] eventRow = Bytes.toBytes("row-id"); byte[] eventPayload = Bytes.toBytes("payload"); ArgumentCaptor<Put> putCaptor = ArgumentCaptor.forClass(Put.class); eventPublisher.publishEvent(eventRow, eventPayload); verify(recordTable).put(putCaptor.capture()); Put put = putCaptor.getValue(); assertArrayEquals(eventRow, put.getRow()); assertEquals(1, put.size()); assertArrayEquals(eventPayload, CellUtil.cloneValue(put.get(PAYLOAD_CF, PAYLOAD_CQ).get(0))); }