### Question:
SugarDb extends SQLiteOpenHelper { public synchronized SQLiteDatabase getDB() { if (this.sqLiteDatabase == null) { this.sqLiteDatabase = getWritableDatabase(); } return this.sqLiteDatabase; } private  SugarDb(); static SugarDb getInstance(); @Override void onCreate(SQLiteDatabase sqLiteDatabase); @Override void onConfigure(SQLiteDatabase db); @Override void onUpgrade(SQLiteDatabase sqLiteDatabase, int oldVersion, int newVersion); synchronized SQLiteDatabase getDB(); @Override synchronized SQLiteDatabase getReadableDatabase(); @Override synchronized void close();  }### Answer:
@Test public void testGetDB() { final SQLiteDatabase db = sugarDb.getDB(); assertEquals(false, db.isReadOnly()); }