SamzaSqlRelMessage implements Serializable { @Override public int hashCode() { return Objects.hash(key, samzaSqlRelRecord); } SamzaSqlRelMessage(List<String> fieldNames, List<Object> fieldValues, SamzaSqlRelMsgMetadata metadata);  SamzaSqlRelMessage(Object key, List<String> fieldNames, List<Object> fieldValues, SamzaSqlRelMsgMetadata metadata);  SamzaSqlRelMessage(@JsonProperty("samzaSqlRelRecord") SamzaSqlRelRecord samzaSqlRelRecord,
      @JsonProperty("samzaSqlRelMsgMetadata") SamzaSqlRelMsgMetadata metadata); @JsonProperty("samzaSqlRelRecord") SamzaSqlRelRecord getSamzaSqlRelRecord(); @JsonProperty("samzaSqlRelMsgMetadata") SamzaSqlRelMsgMetadata getSamzaSqlRelMsgMetadata(); Object getKey(); void setEventTime(long eventTime); void setArrivalTime(long arrivalTime); void setScanTime(long scanTimeNs, long scanTimeMs); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); static SamzaSqlRelRecord createSamzaSqlCompositeKey(SamzaSqlRelMessage message, List<Integer> keyValueIdx,
      List<String> keyPartNames); static SamzaSqlRelRecord createSamzaSqlCompositeKey(SamzaSqlRelMessage message, List<Integer> relIdx); static List<String> getSamzaSqlCompositeKeyFieldNames(List<String> fieldNames,
      List<Integer> nameIds); static final String KEY_NAME; static final String OP_NAME; static final String DELETE_OP; }
@Test public void testEquality() { SamzaSqlRelMessage message1 = new SamzaSqlRelMessage(names, values, new SamzaSqlRelMsgMetadata(0L, 0L)); SamzaSqlRelMessage message2 = new SamzaSqlRelMessage(Arrays.asList("field1", "field2"), Arrays.asList("value1", "value2"), new SamzaSqlRelMsgMetadata(0L, 0L)); Assert.assertEquals(message1, message2); Assert.assertEquals(message1.hashCode(), message2.hashCode()); }
@Test public void testInEquality() { SamzaSqlRelMessage message1 = new SamzaSqlRelMessage(names, values, new SamzaSqlRelMsgMetadata(0L, 0L)); SamzaSqlRelMessage message2 = new SamzaSqlRelMessage(Arrays.asList("field1", "field2"), Arrays.asList("value2", "value2"), new SamzaSqlRelMsgMetadata(0L, 0L)); Assert.assertNotEquals(message1, message2); Assert.assertNotEquals(message1.hashCode(), message2.hashCode()); }