ElifutDataStore extends SQLiteOpenHelper { public int delete(Persistable persistable, int id) { Persistable.Converter<Persistable> converter = converterFor(persistable); return db.delete(converter.tableName(), "id = ?", String.valueOf(id)); } ElifutDataStore(Context context, SqlBrite sqlBrite,
      List<Persistable.Converter<?>> converters); @Override void onCreate(SQLiteDatabase db); @Override void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion); long create(Persistable persistable); void create(Persistable... persistables); void create(List<? extends Persistable> persistables); int update(Persistable persistable, int id); int delete(Persistable persistable, int id); List<T> query(Class<T> type); List<T> query(Class<T> type, int... rowIds); List<T> query(Class<T> type, String whereClause, String... args); @Nullable T queryOne(Class<T> type, int rowId); Observable<List<T>> observe(Class<T> type); Observable<List<T>> observe(
      Class<T> type, String whereClause, String... args); Persistable.Converter<T> converterForType(Class<?> type); void deleteAll();  }
@Test public void testDelete() { List<Club> clubs = Arrays.asList(TestFixtures.GREMIO, TestFixtures.INTERNACIONAL); service.create(clubs); assertThat(service.delete(TestFixtures.GREMIO, TestFixtures.GREMIO.id())).isEqualTo(1); assertThat(service.query(AutoValueClasses.CLUB)) .isEqualTo(Collections.singletonList(TestFixtures.INTERNACIONAL)); }