CursorAsync extends ContentObserverAsync<Cursor, ContentProviderQuery> implements Releaser<Cursor> { @Override public void release(final Cursor data) { data.close(); } CursorAsync(final ContentProviderQuery query, final Executor executor); @Override CursorAsync replicate(); @Override void release(final Cursor data);  }
@SuppressWarnings("unchecked") @Test public void closesCursor() { Async<Cursor> async = asyncCursor(application).uri(uri).get(); Cursor cursor = mock(Cursor.class); ((Releaser<Cursor>) async).release(cursor); verify(cursor).close(); }