public void copyTo(T valueCopy, StreamRecord<T> target) {
        target.value = valueCopy;
        target.timestamp = this.timestamp;
        target.hasTimestamp = this.hasTimestamp;
    }
@Test
    void testCopyTo() {
        StreamRecord<String> recNoTimestamp = new StreamRecord<>("test");
        StreamRecord<String> recNoTimestampCopy = new StreamRecord<>(null);
        recNoTimestamp.copyTo("test", recNoTimestampCopy);
        assertThat(recNoTimestampCopy).isEqualTo(recNoTimestamp);

        StreamRecord<String> recWithTimestamp = new StreamRecord<>("test", 99);
        StreamRecord<String> recWithTimestampCopy = new StreamRecord<>(null);
        recWithTimestamp.copyTo("test", recWithTimestampCopy);
        assertThat(recWithTimestampCopy).isEqualTo(recWithTimestamp);
    }