### Question:
DateTimeIterableFieldAdapter extends SimpleFieldAdapter<Iterable<DateTime>, EntityType> { @Override public Iterable<DateTime> getFrom(ContentValues values) { String datetimeList = values.getAsString(mDateTimeListFieldName); if (datetimeList == null) { return EmptyIterable.instance(); } String timezoneString = mTimeZoneFieldName == null ? null : values.getAsString(mTimeZoneFieldName); TimeZone timeZone = timezoneString == null ? null : TimeZone.getTimeZone(timezoneString); return new DateTimeList(timeZone, datetimeList); } DateTimeIterableFieldAdapter(String datetimeListFieldName, String timezoneFieldName); @Override Iterable<DateTime> getFrom(ContentValues values); @Override Iterable<DateTime> getFrom(Cursor cursor); @Override Iterable<DateTime> getFrom(Cursor cursor, ContentValues values); @Override void setIn(ContentValues values, Iterable<DateTime> value);  }### Answer:
@Test public void testGetFromCVAllDay1() { ContentValues values = new ContentValues(); FieldAdapter<Iterable<DateTime>, ?> adapter = new DateTimeIterableFieldAdapter<TaskAdapter>("x", "y"); values.put("x", "20180109"); assertThat(adapter.getFrom(values), iteratesTo(DateTime.parse("20180109"))); }
@Test public void testGetFromCVAllDay2() { ContentValues values = new ContentValues(); FieldAdapter<Iterable<DateTime>, ?> adapter = new DateTimeIterableFieldAdapter<TaskAdapter>("x", "y"); values.put("x", "20180109,20180110"); assertThat(adapter.getFrom(values), iteratesTo(DateTime.parse("20180109"), DateTime.parse("20180110"))); }
@Test public void testGetFromCVFloating1() { ContentValues values = new ContentValues(); FieldAdapter<Iterable<DateTime>, ?> adapter = new DateTimeIterableFieldAdapter<TaskAdapter>("x", "y"); values.put("x", "20180109T140000"); values.putNull("y"); assertThat(adapter.getFrom(values), iteratesTo(DateTime.parse("20180109T140000"))); }
@Test public void testGetFromCVFloating2() { ContentValues values = new ContentValues(); FieldAdapter<Iterable<DateTime>, ?> adapter = new DateTimeIterableFieldAdapter<TaskAdapter>("x", "y"); values.put("x", "20180109T140000,20180110T140000"); values.putNull("y"); assertThat(adapter.getFrom(values), iteratesTo(DateTime.parse("20180109T140000"), DateTime.parse("20180110T140000"))); }
@Test public void testGetFromCVAbsolute1() { ContentValues values = new ContentValues(); FieldAdapter<Iterable<DateTime>, ?> adapter = new DateTimeIterableFieldAdapter<TaskAdapter>("x", "y"); values.put("x", "20180109T140000Z"); values.put("y", "Europe/Berlin"); assertThat(adapter.getFrom(values), iteratesTo(DateTime.parse("Europe/Berlin", "20180109T150000"))); }
@Test public void testGetFromCVAbsolute2() { ContentValues values = new ContentValues(); FieldAdapter<Iterable<DateTime>, ?> adapter = new DateTimeIterableFieldAdapter<TaskAdapter>("x", "y"); values.put("x", "20180109T140000Z,20180110T140000Z"); values.put("y", "Europe/Berlin"); assertThat(adapter.getFrom(values), iteratesTo(DateTime.parse("Europe/Berlin", "20180109T150000"), DateTime.parse("Europe/Berlin", "20180110T150000"))); }