### Question:
ByteRange { ByteRange extend(long length) { Preconditions.checkArgument(length > 0); return new ByteRange(mStart, mEnd + length); } ByteRange(long start, long end); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void extend_withZeroLength_throwsException() { ByteRange byteRange = new ByteRange(5, 10); assertThrows(IllegalArgumentException.class, () -> byteRange.extend(0)); }