### Question:
BatchWriterConfig implements Writable { public BatchWriterConfig setTimeout(long timeout, TimeUnit timeUnit) { if (timeout < 0) throw new IllegalArgumentException("Negative timeout not allowed " + timeout); if (timeout == 0) this.timeout = Long.MAX_VALUE; else this.timeout = Math.max(1, timeUnit.toMillis(timeout)); return this; }  BatchWriterConfig setMaxMemory(long maxMemory); BatchWriterConfig setMaxLatency(long maxLatency, TimeUnit timeUnit); BatchWriterConfig setTimeout(long timeout, TimeUnit timeUnit); BatchWriterConfig setMaxWriteThreads(int maxWriteThreads); long getMaxMemory(); long getMaxLatency(TimeUnit timeUnit); long getTimeout(TimeUnit timeUnit); int getMaxWriteThreads(); Durability getDurability(); BatchWriterConfig setDurability(Durability durability); @Override void write(DataOutput out); @Override void readFields(DataInput in); @Override boolean equals(Object o); BatchWriterConfig merge(BatchWriterConfig other); @Override int hashCode(); @Override String toString();  }### Answer:
@Test(expected = IllegalArgumentException.class) public void testNegativeTimeout() { BatchWriterConfig bwConfig = new BatchWriterConfig(); bwConfig.setTimeout(-1, TimeUnit.DAYS); }