### Question:
TimeData implements RowData<T> { @NonNull @Override public ContentProviderOperation.Builder updatedBuilder(@NonNull TransactionContext transactionContext, @NonNull ContentProviderOperation.Builder builder) { if (mDue.isPresent() && mStart.isAllDay() != mDue.value().isAllDay()) { throw new IllegalArgumentException("'start' and 'due' must have the same all-day flag"); } DateTime start = mStart; if (mDue.isPresent() && !mDue.value().isAllDay()) { start = mStart.shiftTimeZone(mDue.value().getTimeZone()); } return doUpdateBuilder(start, mDue, mDuration, builder); } private  TimeData(@NonNull DateTime start, @NonNull Optional<DateTime> due, @NonNull Optional<Duration> duration);  TimeData(@NonNull DateTime start, @NonNull DateTime due);  TimeData(@NonNull DateTime start, @NonNull Duration duration);  TimeData(@NonNull DateTime start); @NonNull @Override ContentProviderOperation.Builder updatedBuilder(@NonNull TransactionContext transactionContext, @NonNull ContentProviderOperation.Builder builder);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void test_whenStartIsAllDayAndDueIsNot_throwsIllegalArgument() { new TimeData<>(DateTime.now().toAllDay(), DateTime.now()) .updatedBuilder(mock(TransactionContext.class), mock(ContentProviderOperation.Builder.class)); }
@Test(expected = IllegalArgumentException.class) public void test_whenDueIsAllDayAndStartIsNot_throwsIllegalArgument() { new TimeData<>(DateTime.now(), DateTime.now().toAllDay()) .updatedBuilder(mock(TransactionContext.class), mock(ContentProviderOperation.Builder.class)); }