### Question:
SugarDataSource { public void listAll(final String orderBy, final SuccessCallback<List<T>> successCallback, final ErrorCallback errorCallback) { checkNotNull(successCallback); checkNotNull(errorCallback); final Callable<List<T>> call = new Callable<List<T>>() { @Override public List<T> call() throws Exception { return SugarRecord.listAll(getSugarClass(), orderBy); } }; final Future<List<T>> future = doInBackground(call); List<T> objects; try { objects = future.get(); if (null == objects || objects.isEmpty()) { errorCallback.onError(new Exception("There are no objects in the database")); } else { successCallback.onSuccess(objects); } } catch (Exception e) { errorCallback.onError(e); } } private  SugarDataSource(Class<T> tClass); static SugarDataSource<T> getInstance(Class<T> sClass); void insert(final T object, final SuccessCallback<Long> successCallback, final ErrorCallback errorCallback); void bulkInsert(final List<T> objects, final SuccessCallback<List<Long>> successCallback, final ErrorCallback errorCallback); void findById(final Long id, final SuccessCallback<T> successCallback, final ErrorCallback errorCallback); void query(final String whereClause, final String[] whereArgs, final String groupBy, final String orderBy, final String limit, final SuccessCallback<Cursor> successCallback, final ErrorCallback errorCallback); void listAll(final String orderBy, final SuccessCallback<List<T>> successCallback, final ErrorCallback errorCallback); void update(final T object, final SuccessCallback<Long> successCallback, final ErrorCallback errorCallback); void delete(final T object, final SuccessCallback<Boolean> successCallback, final ErrorCallback errorCallback); void delete(final String whereClause, final String[] whereArgs, final SuccessCallback<Integer> successCallback, final ErrorCallback errorCallback); void deleteAll(final SuccessCallback<Integer> successCallback, final ErrorCallback errorCallback); void count(final SuccessCallback<Long> successCallback, final ErrorCallback errorCallback); Class<T> getSugarClass();  }### Answer:
@Test public void testNullListAll() { recordSugarDataSource.listAll( null, new SugarDataSource.SuccessCallback<List<TestRecord>>() { @Override public void onSuccess(List<TestRecord> object) { assertNull(object); } }, new SugarDataSource.ErrorCallback() { @Override public void onError(Exception e) { assertNotNull(e.getMessage()); } } ); }