@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); }
public static Builder builder() { return new Builder(); }
KafkaMessage { public static Builder builder() { return new Builder(); } }
KafkaMessage { public static Builder builder() { return new Builder(); } private  KafkaMessage(String database, String table, long timestamp, byte[] payload); }
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(); }
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();  }