public static boolean isTimestampValid(String timeStr) {
    try {
      Instant.parse(timeStr);
      return true;
    } catch (Exception e) {
      return false;
    }
  }
@Test
  public void testIsTimestampValid() {
    Assert.assertTrue(TimeUtils.isTimestampValid("2022-08-09T12:31:38.222Z"));
    Assert.assertTrue(TimeUtils.isTimestampValid("2020-02-08T09:30:26Z"));
    Assert.assertFalse(TimeUtils.isTimestampValid("2020-02-08T09"));
    Assert.assertFalse(TimeUtils.isTimestampValid(""));
    Assert.assertFalse(TimeUtils.isTimestampValid("2022-08-09"));
    Assert.assertFalse(TimeUtils.isTimestampValid("2022-08"));
    Assert.assertFalse(TimeUtils.isTimestampValid(null));
  }