### Question:
Cursors { public static <T> FluentIterable<T> toFluentIterable(Cursor cursor, Function<? super Cursor, T> singleRowTransform) { List<T> transformed = Lists.newArrayList(); if (cursor != null) { for (int i = 0; cursor.moveToPosition(i); i++) { transformed.add(singleRowTransform.apply(cursor)); } } return FluentIterable.from(transformed); } private  Cursors(); static FluentIterable<T> toFluentIterable(Cursor cursor, Function<? super Cursor, T> singleRowTransform); static void closeQuietly(Cursor cursor); static Cursor returnSameOrEmptyIfNull(Cursor cursor);  }### Answer:
@Test public void shouldSurviveNullPassedToFluentIterable() throws Exception { final Cursor cursor = null; final FluentIterable<Object> objects = Cursors.toFluentIterable(cursor, new Function<Cursor, Object>() { @Override public Object apply(Cursor cursor) { return null; } }); assertThat(objects).isEmpty(); }