### Question:
DateTimeOption extends ValueOption<DateTimeOption> { @Deprecated public DateTimeOption modify(DateTime newValue) { if (newValue == null) { this.nullValue = true; } else { this.nullValue = false; this.entity.setElapsedSeconds(newValue.getElapsedSeconds()); } return this; } DateTimeOption();  DateTimeOption(DateTime valueOrNull); DateTime get(); DateTime or(DateTime alternate); long or(long alternate); @Deprecated DateTimeOption modify(DateTime newValue); @Deprecated DateTimeOption modify(long newValue); @Override @Deprecated void copyFrom(DateTimeOption optionOrNull); @Override int hashCode(); @Override boolean equals(Object obj); boolean has(DateTime 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 compare() { DateTimeOption a = new DateTimeOption(); DateTimeOption b = new DateTimeOption(); DateTimeOption c = new DateTimeOption(); DateTimeOption d = new DateTimeOption(); a.modify(time(500)); b.modify(time(200)); c.modify(time(499)); d.modify(time(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() { DateTimeOption a = new DateTimeOption(); DateTimeOption b = new DateTimeOption(); DateTimeOption c = new DateTimeOption(); a.modify(time(0)); assertThat(compare(a, b), greaterThan(0)); assertThat(compare(b, a), lessThan(0)); assertThat(compare(b, c), is(0)); }
@Test public void modifyNull() { DateTimeOption option = new DateTimeOption(); option.modify(time(100)); assertThat(option.isNull(), is(false)); option.modify((DateTime) null); assertThat(option.isNull(), is(true)); }