### Question:
DateOption extends ValueOption<DateOption> { @Deprecated public DateOption modify(Date newValue) { if (newValue == null) { this.nullValue = true; } else { this.nullValue = false; this.entity.setElapsedDays(newValue.getElapsedDays()); } return this; } DateOption();  DateOption(Date valueOrNull); Date get(); Date or(Date alternate); int or(int alternate); @Deprecated DateOption modify(Date newValue); @Deprecated DateOption modify(int newValue); @Override @Deprecated void copyFrom(DateOption optionOrNull); @Override int hashCode(); @Override boolean equals(Object obj); boolean has(Date other); @Override int compareTo(WritableRawComparable o); @Override String toString(); @Override void write(DataOutput out); @SuppressWarnings("deprecation") @Override void readFields(DataInput in); @SuppressWarnings("deprecation") @Override int restore(byte[] bytes, int offset, int limit); @Override int getSizeInBytes(byte[] buf, int offset); @Override int compareInBytes(byte[] b1, int o1, byte[] b2, int o2); static int getBytesLength(byte[] bytes, int offset, int length); static int compareBytes(
            byte[] b1, int s1, int l1,
            byte[] b2, int s2, int l2);  }### Answer:
@Test public void modifyNull() { DateOption option = new DateOption(); option.modify(date(100)); assertThat(option.isNull(), is(false)); option.modify((Date) null); assertThat(option.isNull(), is(true)); }
@Test public void compare() { DateOption a = new DateOption(); DateOption b = new DateOption(); DateOption c = new DateOption(); DateOption d = new DateOption(); a.modify(date(500)); b.modify(date(200)); c.modify(date(499)); d.modify(date(500)); assertThat(compare(a, b), greaterThan(0)); assertThat(compare(b, c), lessThan(0)); assertThat(compare(c, a), lessThan(0)); assertThat(compare(a, c), greaterThan(0)); assertThat(compare(b, a), lessThan(0)); assertThat(compare(c, b), greaterThan(0)); assertThat(compare(a, a), is(0)); assertThat(compare(a, d), is(0)); }
@Test public void compareNull() { DateOption a = new DateOption(); DateOption b = new DateOption(); DateOption c = new DateOption(); a.modify(date(0)); assertThat(compare(a, b), greaterThan(0)); assertThat(compare(b, a), lessThan(0)); assertThat(compare(b, c), is(0)); }