use of org.apache.samza.sql.serializers.SamzaSqlRelRecordSerdeFactory.SamzaSqlRelRecordSerde in project samza by apache.
the class TestSamzaSqlRelRecordSerde method testWithDifferentFields.
@Test
public void testWithDifferentFields() {
SamzaSqlRelRecord record = new SamzaSqlRelMessage(names, values, new SamzaSqlRelMsgMetadata(0L, 0L)).getSamzaSqlRelRecord();
SamzaSqlRelRecordSerde serde = (SamzaSqlRelRecordSerde) new SamzaSqlRelRecordSerdeFactory().getSerde(null, null);
SamzaSqlRelRecord resultRecord = serde.fromBytes(serde.toBytes(record));
Assert.assertEquals(names, resultRecord.getFieldNames());
Assert.assertEquals(values, resultRecord.getFieldValues());
}
Aggregations