### Question:
SugarDataSource { public void findById(final Long id, final SuccessCallback<T> successCallback, final ErrorCallback errorCallback) { checkNotNull(successCallback); checkNotNull(errorCallback); checkNotNull(id); final Callable<T> call = new Callable<T>() { @Override public T call() throws Exception { return SugarRecord.findById(getSugarClass(), id); } }; final Future<T> future = doInBackground(call); T object; try { object = future.get(); if (null == object) { errorCallback.onError(new Exception("The object with " + id.toString() + "doesn't exist in database")); } else { successCallback.onSuccess(object); } } 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 nullFindById() { TestRecord record = new TestRecord(); record.setId(0L); recordSugarDataSource.findById( record.getId(), new SugarDataSource.SuccessCallback<TestRecord>() { @Override public void onSuccess(TestRecord object) { assertNull(object); } }, new SugarDataSource.ErrorCallback() { @Override public void onError(Exception e) { assertNotNull(e.getMessage()); } } ); }