### Question:
BreakpointSQLiteHelper extends SQLiteOpenHelper { public void updateInfo(@NonNull BreakpointInfo info) throws IOException { final SQLiteDatabase db = getWritableDatabase(); Cursor cursor = null; db.beginTransaction(); try { cursor = getWritableDatabase().rawQuery( "SELECT " + ID + " FROM " + BREAKPOINT_TABLE_NAME + " WHERE " + ID + " =" + info.id + " LIMIT 1", null); if (!cursor.moveToNext()) return; removeInfo(info.id); insert(info); db.setTransactionSuccessful(); } finally { if (cursor != null) cursor.close(); db.endTransaction(); } } 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 updateInfo() throws IOException { BreakpointInfo info1 = helper.loadToCache().get(insertedInfo1.id); assertThat(info1.getEtag()).isNull(); info1.setEtag("new-etag"); helper.updateInfo(info1); info1 = helper.loadToCache().get(info1.id); assertThat(info1.getEtag()).isEqualTo("new-etag"); }