public static long getSegmentCreationTimeMs(SegmentZKMetadata segmentZKMetadata) {
    // Check push time first, then creation time
    long pushTimeMs = segmentZKMetadata.getPushTime();
    if (pushTimeMs > 0) {
      return pushTimeMs;
    }
    return segmentZKMetadata.getCreationTime();
  }
@Test
  public void testGetSegmentCreationTimeMs() {
    SegmentZKMetadata segmentZKMetadata = new SegmentZKMetadata(SEGMENT);
    segmentZKMetadata.setCreationTime(1000L);
    assertEquals(SegmentUtils.getSegmentCreationTimeMs(segmentZKMetadata), 1000L);
    segmentZKMetadata.setPushTime(2000L);
    assertEquals(SegmentUtils.getSegmentCreationTimeMs(segmentZKMetadata), 2000L);
  }