### Question:
KafkaMessage { public static Builder builder() { return new Builder(); } private  KafkaMessage(String database, String table, long timestamp, byte[] payload); static Builder builder(); String getQualifiedTableName(); String getDatabase(); String getTable(); long getTimestamp(); byte[] getPayload();  }### Answer:
@Test public void emptyTableThrowsException() { byte[] payload = { 1, 2, 3 }; long timestamp = 123l; String database = " database "; String table = " "; assertThatThrownBy(() -> KafkaMessage.builder() .database(database) .table(table) .payload(payload) .timestamp(timestamp) .build()).isInstanceOf(IllegalArgumentException.class); }
@Test public void emptyDatabaseThrowsException() { byte[] payload = { 1, 2, 3 }; long timestamp = 123l; String database = " "; String table = " table "; assertThatThrownBy(() -> KafkaMessage.builder() .database(database) .table(table) .payload(payload) .timestamp(timestamp) .build()).isInstanceOf(IllegalArgumentException.class); }
@Test public void nullPayloadThrowsException() { long timestamp = 123l; String database = " database "; String table = " table "; assertThatThrownBy(() -> KafkaMessage.builder() .database(database) .table(table) .timestamp(timestamp) .build()).isInstanceOf(NullPointerException.class); }