class TimestampMeasurementElement implements MeasurementElement, Serializable {

    public ZonedDateTime asZonedDateTime() {
        return ZonedDateTime.ofInstant(Instant.ofEpochMilli(this.value), ZoneOffset.UTC);
    }

}

class TimestampMeasurementElementTest {

    @Test
    public void AsZonedDateTimeShouldReturnCorrectZonedDateTimeWhenConstructedUsingZonedDateTime() {

        // Arrange
        final ZonedDateTime expected = ZonedDateTime.of(2020, 2, 20, 21, 59, 59, 0, ZoneOffset.UTC);

        // Act
        final TimestampMeasurementElement element = new TimestampMeasurementElement(expected);
        final ZonedDateTime actual = element.asZonedDateTime();

        // Assert
        assertThat(actual).isEqualTo(expected);
    }

}