@Test
  public void testIllegalConstructionForTimeRange() {
    long[][] illegalArgs = new long[][]{{0, -1}, {0, 1}, {-1, 0}, {-1, -1}, {Long.MAX_VALUE, 1}, {1, Long.MAX_VALUE}};
    for (int i = 0; i < illegalArgs.length; i++) {
      try {
        new TimeRange(illegalArgs[i][0], illegalArgs[i][1]);
        fail("Expected IllegalArgumentException not thrown when constructing TimeRange with illegal arguments");
      } catch (IllegalArgumentException e) {
        // Expected exception thrown
      }
    }
  }
Tests to ensure IllegalArgumentException is thrown when given illegal arguments.
ambry-store/src/test/java/com/github/ambry/store/TimeRangeTest.java