### Question:
BreakpointSQLiteHelper extends SQLiteOpenHelper { public void markFileDirty(int id) { final SQLiteDatabase db = getWritableDatabase(); ContentValues values = new ContentValues(1); values.put(ID, id); db.insert(TASK_FILE_DIRTY_TABLE_NAME, null, values); } BreakpointSQLiteHelper(Context context); @Override void onOpen(SQLiteDatabase db); @Override void onCreate(SQLiteDatabase db); @Override void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion); @Override void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion); void markFileDirty(int id); void markFileClear(int id); List<Integer> loadDirtyFileList(); SparseArray<BreakpointInfo> loadToCache(); HashMap<String, String> loadResponseFilenameToMap(); void updateFilename(@NonNull String url, @NonNull String filename); void insert(@NonNull BreakpointInfo info); void updateBlockIncrease(@NonNull BreakpointInfo info, int blockIndex,
                                    long newCurrentOffset); void updateInfo(@NonNull BreakpointInfo info); void removeInfo(int id); void removeBlock(int breakpointId);  }### Answer:
@Test public void markFileDirty() { doReturn(db).when(helper).getWritableDatabase(); helper.markFileDirty(1); ArgumentCaptor<ContentValues> captor = ArgumentCaptor.forClass(ContentValues.class); verify(db).insert(eq(TASK_FILE_DIRTY_TABLE_NAME), nullable(String.class), captor.capture()); assertThat(captor.getValue().get(ID)).isEqualTo(1); }