XkcdDatabaseHandler { public void insertStripe(final @NonNull DatabaseStripe databaseStripe) { final Insert<DatabaseStripe> statement = SQLite.insert(DatabaseStripe.class).orReplace(); final ContentValues values = new ContentValues(); @SuppressWarnings("unchecked") final ModelAdapter<DatabaseStripe> adapter = (ModelAdapter<DatabaseStripe>) databaseStripe .getModelAdapter(); adapter.bindToContentValues(values, databaseStripe); statement.columnValues(values).execute(); } @Inject  XkcdDatabaseHandler(); void insertStripe(final @NonNull DatabaseStripe databaseStripe); @Nullable @Contract(pure = true) DatabaseStripe queryForStripeWithNum(final long stripeNum);  }
@Test public void testInsertValid() { final DatabaseStripe stripe = generateRandomDatabaseStripe(); mSut.insertStripe(stripe); assertThat(SQLite.select().from(DatabaseStripe.class).query().getCount()).isEqualTo(1); }