### Question:
SingleStreamDiffScriptWriter implements DiffScriptWriter { @Override public void writeChunk(long chunkStart, int chunkLength) throws IOException { Preconditions.checkArgument(chunkStart >= 0); Preconditions.checkArgument(chunkLength > 0); if (mBufferSize != 0) { writeByteBuffer(); } if (mReusableChunk != null && mReusableChunk.getEnd() + 1 == chunkStart) { mReusableChunk = mReusableChunk.extend(chunkLength); } else { writeReusableChunk(); mReusableChunk = new ByteRange(chunkStart, chunkStart + chunkLength - 1); } } SingleStreamDiffScriptWriter(OutputStream outputStream, int maxNewByteChunkSize); @Override void writeByte(byte b); @Override void writeChunk(long chunkStart, int chunkLength); @Override void flush();  }### Answer:
@Test public void writeChunk_withNegativeStart_throwsException() { assertThrows( IllegalArgumentException.class, () -> mDiffScriptWriter.writeChunk(-1, 50)); }
@Test public void writeChunk_withZeroLength_throwsException() { assertThrows( IllegalArgumentException.class, () -> mDiffScriptWriter.writeChunk(0, 0)); }