public long getTimestamp() {
        if (hasTimestamp) {
            return timestamp;
        } else {
            return Long.MIN_VALUE;
            //			throw new IllegalStateException(
            //					"Record has no timestamp. Is the time characteristic set to 'ProcessingTime', or
            // " +
            //							"did you forget to call 'DataStream.assignTimestampsAndWatermarks(...)'?");
        }
    }
@Test
    void testAllowedTimestampRange() {
        assertThat(new StreamRecord<>("test", 0).getTimestamp()).isZero();
        assertThat(new StreamRecord<>("test", -1).getTimestamp()).isEqualTo(-1L);
        assertThat(new StreamRecord<>("test", 1).getTimestamp()).isOne();
        assertThat(new StreamRecord<>("test", Long.MIN_VALUE).getTimestamp())
                .isEqualTo(Long.MIN_VALUE);
        assertThat(new StreamRecord<>("test", Long.MAX_VALUE).getTimestamp())
                .isEqualTo(Long.MAX_VALUE);
    }