public StreamRecord<T> copy(T valueCopy) {
        StreamRecord<T> copy = new StreamRecord<>(valueCopy);
        copy.timestamp = this.timestamp;
        copy.hasTimestamp = this.hasTimestamp;
        return copy;
    }
@Test
    void testCopy() {
        StreamRecord<String> recNoTimestamp = new StreamRecord<>("test");
        StreamRecord<String> recNoTimestampCopy = recNoTimestamp.copy("test");
        assertThat(recNoTimestampCopy).isEqualTo(recNoTimestamp);

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