Ripristina tutte le istanze singleton tra ogni test o otterrai effetti collaterali come i tuoi.
@After
public void finishComponentTesting() {
resetSingleton(YourSQLiteOpenHelper.class, "sInstance");
}
private void resetSingleton(Class clazz, String fieldName) {
Field instance;
try {
instance = clazz.getDeclaredField(fieldName);
instance.setAccessible(true);
instance.set(null, null);
} catch (Exception e) {
throw new RuntimeException();
}
}